if (numBytes < 1024)
buf << numBytes << " byte(s)";
else if (numBytes < 1024 * 1024)
- buf << de::floatToString(numBytes/1024.0f, 1) << " KiB";
+ buf << de::floatToString((float)numBytes/1024.0f, 1) << " KiB";
else
- buf << de::floatToString(numBytes/1024.0f/1024.0f, 1) << " MiB";
+ buf << de::floatToString((float)numBytes/1024.0f/1024.0f, 1) << " MiB";
return buf.str();
}
bestTime = sectionTimes[sectionNdx];
// Detect if write takes 50% longer than it should, and warm up if that happened
- if (sectionNdx != numSections-1 && (float)sectionTimes[sectionNdx] > 1.5f * bestTime)
+ if (sectionNdx != numSections-1 && (float)sectionTimes[sectionNdx] > 1.5f * (float)bestTime)
{
deYield();
tcu::warmupCPU();
for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
{
- const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].writtenSize);
+ const float fitResidual = (float)samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * (float)samples[sampleNdx].writtenSize);
log << tcu::TestLog::Sample
<< samples[sampleNdx].writtenSize
<< samples[sampleNdx].bufferSize
for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
{
- const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].writtenSize);
+ const float fitResidual = (float)samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * (float)samples[sampleNdx].writtenSize);
log << tcu::TestLog::Sample
<< samples[sampleNdx].writtenSize
<< samples[sampleNdx].bufferSize
for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
{
- const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].writtenSize);
+ const float fitResidual = (float)samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * (float)samples[sampleNdx].writtenSize);
log << tcu::TestLog::Sample
<< samples[sampleNdx].writtenSize
<< samples[sampleNdx].bufferSize
for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
{
- const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].writtenSize);
+ const float fitResidual = (float)samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * (float)samples[sampleNdx].writtenSize);
log << tcu::TestLog::Sample
<< samples[sampleNdx].writtenSize
<< samples[sampleNdx].bufferSize
for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
{
- const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].writtenSize);
+ const float fitResidual = (float)samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * (float)samples[sampleNdx].writtenSize);
log << tcu::TestLog::Sample
<< samples[sampleNdx].writtenSize
<< samples[sampleNdx].bufferSize
for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
{
- const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].renderDataSize);
+ const float fitResidual = (float)samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * (float)samples[sampleNdx].renderDataSize);
log << tcu::TestLog::Sample
<< samples[sampleNdx].renderDataSize
<< samples[sampleNdx].numVertices
for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
{
- const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].renderDataSize);
+ const float fitResidual = (float)samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * (float)samples[sampleNdx].renderDataSize);
log << tcu::TestLog::Sample
<< samples[sampleNdx].renderDataSize
<< samples[sampleNdx].numVertices
for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
{
- const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].renderDataSize);
+ const float fitResidual = (float)samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * (float)samples[sampleNdx].renderDataSize);
log << tcu::TestLog::Sample
<< samples[sampleNdx].renderDataSize
<< samples[sampleNdx].uploadedDataSize
for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
{
- const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].renderDataSize);
+ const float fitResidual = (float)samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * (float)samples[sampleNdx].renderDataSize);
log << tcu::TestLog::Sample
<< samples[sampleNdx].renderDataSize
<< samples[sampleNdx].uploadedDataSize
for (int sampleNdx = 0; sampleNdx < (int)samples.size(); ++sampleNdx)
{
- const float fitResidual = samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * samples[sampleNdx].renderDataSize);
+ const float fitResidual = (float)samples[sampleNdx].duration.fitResponseDuration - (theilSenFitting.offset + theilSenFitting.coefficient * (float)samples[sampleNdx].renderDataSize);
log << tcu::TestLog::Sample
<< samples[sampleNdx].renderDataSize
<< samples[sampleNdx].uploadedDataSize
static UploadSampleAnalyzeResult analyzeSampleResults (tcu::TestLog& log, const std::vector<UploadSampleResult<SampleType> >& samples, bool logBucketPerformance)
{
// Assume data is linear with some outliers, fit a line
- const LineParametersWithConfidence theilSenFitting = fitLineToSamples(samples);
+ const LineParametersWithConfidence theilSenFitting = fitLineToSamples(samples);
const typename SampleTypeTraits<SampleType>::StatsType resultStats = calculateSampleStatistics(theilSenFitting, samples);
float approximatedTransferRate;
float approximatedTransferRateNoConstant;
static RenderSampleAnalyzeResult analyzeSampleResults (tcu::TestLog& log, const std::vector<RenderSampleResult<SampleType> >& samples)
{
// Assume data is linear with some outliers, fit a line
- const LineParametersWithConfidence theilSenFitting = fitLineToSamples(samples);
+ const LineParametersWithConfidence theilSenFitting = fitLineToSamples(samples);
const typename SampleTypeTraits<SampleType>::StatsType resultStats = calculateSampleStatistics(theilSenFitting, samples);
float approximatedProcessingRate;
float approximatedProcessingRateNoConstant;
// make sure our zeroBuffer is large enough
if (m_respecifySize)
{
- const int largerBufferSize = deAlign32((int)(m_bufferSizeMax * m_sizeDifferenceFactor), 4*4);
+ const int largerBufferSize = deAlign32((int)((float)m_bufferSizeMax * m_sizeDifferenceFactor), 4*4);
m_zeroData.resize(largerBufferSize, 0x00);
}
}
const int drawEnd = deAlign32(bufferSize * 3 / 4, 4*4);
const glw::Functions& gl = m_context.getRenderContext().getFunctions();
- const int largerBufferSize = deAlign32((int)(bufferSize * m_sizeDifferenceFactor), 4*4);
+ const int largerBufferSize = deAlign32((int)((float)bufferSize * m_sizeDifferenceFactor), 4*4);
const int newBufferSize = (m_respecifySize) ? (largerBufferSize) : (bufferSize);
deUint64 startTime;
deUint64 endTime;
for (int cellZ = 0; cellZ < scene.gridLayers; ++cellZ)
{
const tcu::Vec4 color = (((cellX + cellY + cellZ) % 2) == 0) ? (green) : (yellow);
- const float cellLeft = (float(cellX ) / scene.gridWidth - 0.5f) * 2.0f;
- const float cellRight = (float(cellX+1) / scene.gridWidth - 0.5f) * 2.0f;
- const float cellTop = (float(cellY+1) / scene.gridHeight - 0.5f) * 2.0f;
- const float cellBottom = (float(cellY ) / scene.gridHeight - 0.5f) * 2.0f;
+ const float cellLeft = (float(cellX ) / (float)scene.gridWidth - 0.5f) * 2.0f;
+ const float cellRight = (float(cellX+1) / (float)scene.gridWidth - 0.5f) * 2.0f;
+ const float cellTop = (float(cellY+1) / (float)scene.gridHeight - 0.5f) * 2.0f;
+ const float cellBottom = (float(cellY ) / (float)scene.gridHeight - 0.5f) * 2.0f;
vertexData[(cellY * scene.gridWidth * scene.gridLayers + cellX * scene.gridLayers + cellZ) * 12 + 0] = color;
vertexData[(cellY * scene.gridWidth * scene.gridLayers + cellX * scene.gridLayers + cellZ) * 12 + 1] = tcu::Vec4(cellLeft, cellTop, 0.0f, 1.0f);
deYield();
// "Render" something and wait for it
- gl.clearColor(0.0f, 1.0f, m_sampleNdx / float(m_numSamples), 1.0f);
+ gl.clearColor(0.0f, 1.0f, float(m_sampleNdx) / float(m_numSamples), 1.0f);
gl.clear(GL_COLOR_BUFFER_BIT);
// wait for results
// log
{
const char* const targetFunctionName = (m_drawMethod == DRAWMETHOD_DRAW_ARRAYS) ? ("drawArrays") : ("drawElements");
- const int perVertexSize = (m_targetBuffer == TARGETBUFFER_INDEX) ? (sizeof(deUint32)) : (sizeof(tcu::Vec4[2]));
+ const int perVertexSize = (m_targetBuffer == TARGETBUFFER_INDEX) ? ((int)sizeof(deUint32)) : ((int)sizeof(tcu::Vec4[2]));
const int fullMinUploadSize = RenderCase<SampleType>::getMinWorkloadSize() * perVertexSize;
const int fullMaxUploadSize = RenderCase<SampleType>::getMaxWorkloadSize() * perVertexSize;
const int minUploadSize = (m_uploadRange == UPLOADRANGE_FULL) ? (fullMinUploadSize) : (deAlign32(fullMinUploadSize/2, 4));
const int maxUploadSize = (m_uploadRange == UPLOADRANGE_FULL) ? (fullMaxUploadSize) : (deAlign32(fullMaxUploadSize/2, 4));
- const int minUnrelatedUploadSize = RenderCase<SampleType>::getMinWorkloadSize() * sizeof(tcu::Vec4[2]);
- const int maxUnrelatedUploadSize = RenderCase<SampleType>::getMaxWorkloadSize() * sizeof(tcu::Vec4[2]);
+ const int minUnrelatedUploadSize = RenderCase<SampleType>::getMinWorkloadSize() * (int)sizeof(tcu::Vec4[2]);
+ const int maxUnrelatedUploadSize = RenderCase<SampleType>::getMaxWorkloadSize() * (int)sizeof(tcu::Vec4[2]);
m_testCtx.getLog()
<< tcu::TestLog::Message
lineFit = theilSenSiegelLinearRegression(dataPoints, 0.6f);
// Difference of more than 25% of the offset along the whole sample range
- if (de::abs(lineFit.coefficient) * numDataPoints > de::abs(lineFit.offset) * 0.25f)
+ if (de::abs(lineFit.coefficient) * (float)numDataPoints > de::abs(lineFit.offset) * 0.25f)
{
m_testCtx.getLog()
<< tcu::TestLog::Message