Skip to content

Commit

Permalink
[paramgrill] Fix mingw build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
terrelln committed Apr 18, 2019
1 parent 579f3d7 commit 785331a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/paramgrill.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,8 @@ compareResultLT(const BMK_benchResult_t result1, const BMK_benchResult_t result2

static constraint_t relaxTarget(constraint_t target) {
target.cMem = (U32)-1;
target.cSpeed *= ((double)g_strictness) / 100;
target.dSpeed *= ((double)g_strictness) / 100;
target.cSpeed = (target.cSpeed * g_strictness) / 100;
target.dSpeed = (target.dSpeed * g_strictness) / 100;
return target;
}

Expand Down Expand Up @@ -1737,8 +1737,8 @@ static int allBench(BMK_benchResult_t* resultPtr,

/* optimistic assumption of benchres */
{ BMK_benchResult_t resultMax = benchres;
resultMax.cSpeed *= uncertaintyConstantC * VARIANCE;
resultMax.dSpeed *= uncertaintyConstantD * VARIANCE;
resultMax.cSpeed = (unsigned long long)(resultMax.cSpeed * uncertaintyConstantC * VARIANCE);
resultMax.dSpeed = (unsigned long long)(resultMax.dSpeed * uncertaintyConstantD * VARIANCE);

/* disregard infeasible results in feas mode */
/* disregard if resultMax < winner in infeas mode */
Expand Down Expand Up @@ -2429,9 +2429,9 @@ optimizeForSize(const char* const * const fileNamesTable, const size_t nbFiles,
}

g_lvltarget = winner.result;
g_lvltarget.cSpeed *= ((double)g_strictness) / 100;
g_lvltarget.dSpeed *= ((double)g_strictness) / 100;
g_lvltarget.cSize /= ((double)g_strictness) / 100;
g_lvltarget.cSpeed = (g_lvltarget.cSpeed * g_strictness) / 100;
g_lvltarget.dSpeed = (g_lvltarget.dSpeed * g_strictness) / 100;
g_lvltarget.cSize = (g_lvltarget.cSize * 100) / g_strictness;

target.cSpeed = (U32)g_lvltarget.cSpeed;
target.dSpeed = (U32)g_lvltarget.dSpeed;
Expand Down

0 comments on commit 785331a

Please sign in to comment.