Bug fix: sizes array wasn't updating with ARRAY_SIZE argument
sizes array was fixed at compile time not run time. Moved the declaration to the correct scope.
This commit is contained in:
parent
c3ad5edcb3
commit
a74e7cee4c
@ -40,13 +40,6 @@ struct badntimes : public std::exception
|
||||
}
|
||||
};
|
||||
|
||||
size_t sizes[4] = {
|
||||
2 * DATATYPE_SIZE * ARRAY_SIZE,
|
||||
2 * DATATYPE_SIZE * ARRAY_SIZE,
|
||||
3 * DATATYPE_SIZE * ARRAY_SIZE,
|
||||
3 * DATATYPE_SIZE * ARRAY_SIZE
|
||||
};
|
||||
|
||||
void check_solution(void* a, void* b, void* c)
|
||||
{
|
||||
// Generate correct solution
|
||||
@ -279,6 +272,12 @@ int main(int argc, char *argv[])
|
||||
check_solution(h_a, h_b, h_c);
|
||||
|
||||
// Crunch results
|
||||
size_t sizes[4] = {
|
||||
2 * DATATYPE_SIZE * ARRAY_SIZE,
|
||||
2 * DATATYPE_SIZE * ARRAY_SIZE,
|
||||
3 * DATATYPE_SIZE * ARRAY_SIZE,
|
||||
3 * DATATYPE_SIZE * ARRAY_SIZE
|
||||
};
|
||||
double min[4] = {DBL_MAX, DBL_MAX, DBL_MAX, DBL_MAX};
|
||||
double max[4] = {0.0, 0.0, 0.0, 0.0};
|
||||
double avg[4] = {0.0, 0.0, 0.0, 0.0};
|
||||
|
||||
@ -49,12 +49,6 @@ struct badntimes : public std::exception
|
||||
}
|
||||
};
|
||||
|
||||
size_t sizes[4] = {
|
||||
2 * DATATYPE_SIZE * ARRAY_SIZE,
|
||||
2 * DATATYPE_SIZE * ARRAY_SIZE,
|
||||
3 * DATATYPE_SIZE * ARRAY_SIZE,
|
||||
3 * DATATYPE_SIZE * ARRAY_SIZE
|
||||
};
|
||||
|
||||
void check_solution(void* a, void* b, void* c)
|
||||
{
|
||||
@ -288,6 +282,12 @@ int main(int argc, char *argv[])
|
||||
check_solution(h_a, h_b, h_c);
|
||||
|
||||
// Crunch results
|
||||
size_t sizes[4] = {
|
||||
2 * DATATYPE_SIZE * ARRAY_SIZE,
|
||||
2 * DATATYPE_SIZE * ARRAY_SIZE,
|
||||
3 * DATATYPE_SIZE * ARRAY_SIZE,
|
||||
3 * DATATYPE_SIZE * ARRAY_SIZE
|
||||
};
|
||||
double min[4] = {DBL_MAX, DBL_MAX, DBL_MAX, DBL_MAX};
|
||||
double max[4] = {0.0, 0.0, 0.0, 0.0};
|
||||
double avg[4] = {0.0, 0.0, 0.0, 0.0};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user