Now all host functions start with acHost to avoid confusion on whether the function operates on host or device memory

This commit is contained in:
jpekkila
2020-11-24 21:32:43 +02:00
parent 095f863097
commit bcacc357d3
15 changed files with 78 additions and 77 deletions

View File

@@ -98,7 +98,7 @@ main(int argc, char** argv)
info.int_params[AC_nx] = nx;
info.int_params[AC_ny] = ny;
info.int_params[AC_nz] = nz;
acUpdateBuiltinParams(&info);
acHostUpdateBuiltinParams(&info);
printf("Benchmark mesh dimensions: (%d, %d, %d)\n", nx, ny, nz);
}
else {
@@ -118,8 +118,8 @@ main(int argc, char** argv)
/*
AcMesh model, candidate;
if (pid == 0) {
acMeshCreate(info, &model);
acMeshCreate(info, &candidate);
acHostMeshCreate(info, &model);
acHostMeshCreate(info, &candidate);
acMeshRandomize(&model);
acMeshRandomize(&candidate);
}*/
@@ -130,7 +130,7 @@ main(int argc, char** argv)
/*
AcMesh model;
acMeshCreate(info, &model);
acHostMeshCreate(info, &model);
acMeshRandomize(&model);
acGridLoadMesh(STREAM_DEFAULT, model);
*/
@@ -145,12 +145,12 @@ main(int argc, char** argv)
// Verify
if (pid == 0) {
acModelIntegrateStep(model, FLT_EPSILON);
acHostIntegrateStep(model, FLT_EPSILON);
acMeshApplyPeriodicBounds(&model);
AcResult retval = acVerifyMesh(model, candidate);
acMeshDestroy(&model);
acMeshDestroy(&candidate);
acHostMeshDestroy(&model);
acHostMeshDestroy(&candidate);
if (retval != AC_SUCCESS) {
fprintf(stderr, "Failures found, benchmark invalid. Skipping\n");