Fixed inconsistency in the acGridLoad parameter order
This commit is contained in:
@@ -171,7 +171,7 @@ AcResult acNodeLoadVertexBufferWithOffset(const Node node, const Stream stream,
|
|||||||
const AcMesh host_mesh,
|
const AcMesh host_mesh,
|
||||||
const VertexBufferHandle vtxbuf_handle, const int3 src,
|
const VertexBufferHandle vtxbuf_handle, const int3 src,
|
||||||
const int3 dst, const int num_vertices);
|
const int3 dst, const int num_vertices);
|
||||||
AcResult acGridLoadMesh(const AcMesh host_mesh, const Stream stream);
|
AcResult acGridLoadMesh(const Stream stream, const AcMesh host_mesh);
|
||||||
```
|
```
|
||||||
|
|
||||||
Storing meshes and vertex buffer to host memory.
|
Storing meshes and vertex buffer to host memory.
|
||||||
@@ -435,7 +435,7 @@ after initialization.
|
|||||||
|
|
||||||
### Decomposition (`acNode` layer)
|
### Decomposition (`acNode` layer)
|
||||||
|
|
||||||
> **Note:** This section describes implementation details specific to the acNode layer. The acGrid layer is not related to the `GridDims` structure described here.
|
> **Note:** This section describes implementation details specific to the acNode layer. The acGrid layer is not related to the `GridDims` structure described here.
|
||||||
|
|
||||||
`GridDims` contains the dimensions of the the mesh decomposed to multiple devices.
|
`GridDims` contains the dimensions of the the mesh decomposed to multiple devices.
|
||||||
```C
|
```C
|
||||||
|
@@ -290,7 +290,7 @@ AcResult acGridQuit(void);
|
|||||||
AcResult acGridSynchronizeStream(const Stream stream);
|
AcResult acGridSynchronizeStream(const Stream stream);
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
AcResult acGridLoadMesh(const AcMesh host_mesh, const Stream stream);
|
AcResult acGridLoadMesh(const Stream stream, const AcMesh host_mesh);
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
AcResult acGridStoreMesh(const Stream stream, AcMesh* host_mesh);
|
AcResult acGridStoreMesh(const Stream stream, AcMesh* host_mesh);
|
||||||
|
@@ -126,8 +126,12 @@ main(int argc, char** argv)
|
|||||||
|
|
||||||
// GPU alloc & compute
|
// GPU alloc & compute
|
||||||
acGridInit(info);
|
acGridInit(info);
|
||||||
|
AcMesh model;
|
||||||
|
acMeshCreate(info, &model);
|
||||||
|
acMeshRandomize(&model);
|
||||||
|
acGridLoadMesh(STREAM_DEFAULT, model);
|
||||||
/*
|
/*
|
||||||
acGridLoadMesh(model, STREAM_DEFAULT);
|
acGridLoadMesh(STREAM_DEFAULT, model);
|
||||||
|
|
||||||
acGridIntegrate(STREAM_DEFAULT, FLT_EPSILON);
|
acGridIntegrate(STREAM_DEFAULT, FLT_EPSILON);
|
||||||
acGridPeriodicBoundconds(STREAM_DEFAULT);
|
acGridPeriodicBoundconds(STREAM_DEFAULT);
|
||||||
@@ -149,7 +153,6 @@ main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
// Percentiles
|
// Percentiles
|
||||||
const size_t num_iters = 1000;
|
const size_t num_iters = 1000;
|
||||||
const double nth_percentile = 0.90;
|
const double nth_percentile = 0.90;
|
||||||
@@ -189,11 +192,11 @@ main(int argc, char** argv)
|
|||||||
ERRCHK_ALWAYS(fp);
|
ERRCHK_ALWAYS(fp);
|
||||||
// Format
|
// Format
|
||||||
// nprocs, min, 50th perc, 90th perc, max
|
// nprocs, min, 50th perc, 90th perc, max
|
||||||
fprintf(fp, "%d, %g, %g, %g, %g\n", nprocs, results[0], results[0.5 * num_iters], results[nth_percentile * num_iters], results[num_iters-1]);
|
fprintf(fp, "%d, %g, %g, %g, %g\n", nprocs, results[0], results[0.5 * num_iters],
|
||||||
|
results[nth_percentile * num_iters], results[num_iters - 1]);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
acGridQuit();
|
acGridQuit();
|
||||||
MPI_Finalize();
|
MPI_Finalize();
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
@@ -51,7 +51,7 @@ main(void)
|
|||||||
acGridInit(info);
|
acGridInit(info);
|
||||||
|
|
||||||
// INTEGRATION TESTS START ---------------------------------------------------------------------
|
// INTEGRATION TESTS START ---------------------------------------------------------------------
|
||||||
acGridLoadMesh(model, STREAM_DEFAULT);
|
acGridLoadMesh(STREAM_DEFAULT, model);
|
||||||
acGridIntegrate(STREAM_DEFAULT, FLT_EPSILON);
|
acGridIntegrate(STREAM_DEFAULT, FLT_EPSILON);
|
||||||
acGridPeriodicBoundconds(STREAM_DEFAULT);
|
acGridPeriodicBoundconds(STREAM_DEFAULT);
|
||||||
acGridStoreMesh(STREAM_DEFAULT, &candidate);
|
acGridStoreMesh(STREAM_DEFAULT, &candidate);
|
||||||
@@ -64,7 +64,7 @@ main(void)
|
|||||||
// INTEGRATION TESTS END -----------------------------------------------------------------------
|
// INTEGRATION TESTS END -----------------------------------------------------------------------
|
||||||
|
|
||||||
// REDUCTION TESTS START -----------------------------------------------------------------------
|
// REDUCTION TESTS START -----------------------------------------------------------------------
|
||||||
acGridLoadMesh(model, STREAM_DEFAULT);
|
acGridLoadMesh(STREAM_DEFAULT, model);
|
||||||
|
|
||||||
std::vector<AcScalReductionTestCase> scalarReductionTests{
|
std::vector<AcScalReductionTestCase> scalarReductionTests{
|
||||||
acCreateScalReductionTestCase("Scalar MAX", VTXBUF_UUX, RTYPE_MAX),
|
acCreateScalReductionTestCase("Scalar MAX", VTXBUF_UUX, RTYPE_MAX),
|
||||||
|
@@ -1309,7 +1309,7 @@ acGridQuit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AcResult
|
AcResult
|
||||||
acGridLoadMesh(const AcMesh host_mesh, const Stream stream)
|
acGridLoadMesh(const Stream stream, const AcMesh host_mesh)
|
||||||
{
|
{
|
||||||
ERRCHK(grid.initialized);
|
ERRCHK(grid.initialized);
|
||||||
acGridSynchronizeStream(stream);
|
acGridSynchronizeStream(stream);
|
||||||
|
Reference in New Issue
Block a user