Added some new comments + some helpful old comments from a time before the interface revision

This commit is contained in:
jpekkila
2019-08-07 20:05:54 +03:00
parent 2b3f9d75af
commit 322cdce52c
2 changed files with 124 additions and 0 deletions

View File

@@ -41,27 +41,44 @@ extern "C" {
#define acLoadDeviceConstant(x, y) acGridLoadConstant(STREAM_DEFAULT, x, y)
*/
/** Allocates all memory and initializes the devices visible to the caller. Should be
* called before any other function in this interface. */
AcResult acInit(const AcMeshInfo mesh_info);
/** Frees all GPU allocations and resets all devices in the node. Should be
* called at exit. */
AcResult acQuit(void);
/** Synchronizes a specific stream. All streams are synchronized if STREAM_ALL is passed as a
* parameter*/
AcResult acSynchronizeStream(const Stream stream);
/** Loads a constant to the memories of the devices visible to the caller */
AcResult acLoadDeviceConstant(const AcRealParam param, const AcReal value);
/** Loads an AcMesh to the devices visible to the caller */
AcResult acLoad(const AcMesh host_mesh);
/** Stores the AcMesh distributed among the devices visible to the caller back to the host*/
AcResult acStore(AcMesh* host_mesh);
/** Performs Runge-Kutta 3 integration. Note: Boundary conditions are not applied after the final
* substep and the user is responsible for calling acBoundcondStep before reading the data. */
AcResult acIntegrate(const AcReal dt);
/** Applies periodic boundary conditions for the Mesh distributed among the devices visible to the
* caller*/
AcResult acBoundcondStep(void);
/** Does a scalar reduction with the data stored in some vertex buffer */
AcReal acReduceScal(const ReductionType rtype, const VertexBufferHandle vtxbuf_handle);
/** Does a vector reduction with vertex buffers where the vector components are (a, b, c) */
AcReal acReduceVec(const ReductionType rtype, const VertexBufferHandle a,
const VertexBufferHandle b, const VertexBufferHandle c);
/** Stores a subset of the mesh stored across the devices visible to the caller back to host memory.
*/
AcResult acStoreWithOffset(const int3 dst, const size_t num_vertices, AcMesh* host_mesh);
#ifdef __cplusplus