|
Astaroth
3.1
Scalable Multi-GPU Stencil Computations
|
#include "acc_runtime.h"#include "astaroth_base.h"#include "func_define.h"#include "host_datatypes.h"Go to the source code of this file.
Functions | |
| AcResult | acBoundcondStep (void) |
| AcResult | acBoundcondStepGBC (const AcMeshInfo config) |
| AcResult | acCheckDeviceAvailability (void) |
| AcResult | acGetFieldHandle (const char *field, size_t *handle) |
| Node | acGetNode (void) |
| int | acGetNumDevicesPerNode (void) |
| AcResult | acInit (const AcMeshInfo mesh_info) |
| AcResult | acIntegrate (const AcReal dt) |
| AcResult | acIntegrateGBC (const AcMeshInfo config, const AcReal dt) |
| AcResult | acIntegrateStep (const int isubstep, const AcReal dt) |
| AcResult | acIntegrateStepWithOffset (const int isubstep, const AcReal dt, const Volume start, const Volume end) |
| AcResult | acLoad (const AcMesh host_mesh) |
| AcResult | acLoadDeviceConstant (const AcRealParam param, const AcReal value) |
| AcResult | acLoadWithOffset (const AcMesh host_mesh, const int3 src, const int num_vertices) |
| AcResult | acQuit (void) |
| AcReal | acReduceScal (const AcReduction reduction, const VertexBufferHandle vtxbuf_handle) |
| AcReal | acReduceVec (const AcReduction reduction, const VertexBufferHandle a, const VertexBufferHandle b, const VertexBufferHandle c) |
| AcReal | acReduceVecScal (const AcReduction reduction, const VertexBufferHandle a, const VertexBufferHandle b, const VertexBufferHandle c, const VertexBufferHandle d) |
| AcResult | acSetVertexBuffer (const VertexBufferHandle handle, const AcReal value) |
| AcResult | acStore (AcMesh *host_mesh) |
| AcResult | acStoreWithOffset (const int3 dst, const size_t num_vertices, AcMesh *host_mesh) |
| AcResult | acSynchronize (void) |
| AcResult | acSynchronizeMesh (void) |
| AcResult | acSynchronizeStream (const Stream stream) |
| AcResult acBoundcondStep | ( | void | ) |
Applies periodic boundary conditions for the Mesh distributed among the devices visible to the caller
| AcResult acBoundcondStepGBC | ( | const AcMeshInfo | config | ) |
Applies general outer boundary conditions for the Mesh distributed among the devices visible to the caller
| AcResult acCheckDeviceAvailability | ( | void | ) |
| AcResult acGetFieldHandle | ( | const char * | field, |
| size_t * | handle ) |
Gets the field handle corresponding to a null-terminated str and stores the result in handle.
Returns AC_SUCCESS on success. Returns AC_FAILURE if the field was not found and sets handle to SIZE_MAX.
Example usage:
| Node acGetNode | ( | void | ) |
| int acGetNumDevicesPerNode | ( | void | ) |
| AcResult acInit | ( | const AcMeshInfo | mesh_info | ) |
Allocates all memory and initializes the devices visible to the caller. Should be called before any other function in this interface.
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 acIntegrateGBC | ( | const AcMeshInfo | config, |
| const AcReal | dt ) |
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. Has customizable boundary conditions.
Will potentially be deprecated in later versions. Added only to fix backwards compatibility with PC for now.
| AcResult acIntegrateStepWithOffset | ( | const int | isubstep, |
| const AcReal | dt, | ||
| const Volume | start, | ||
| const Volume | end ) |
Loads a constant to the memories of the devices visible to the caller
| AcResult acQuit | ( | void | ) |
Frees all GPU allocations and resets all devices in the node. Should be called at exit.
| AcReal acReduceScal | ( | const AcReduction | reduction, |
| const VertexBufferHandle | vtxbuf_handle ) |
Does a scalar reduction with the data stored in some vertex buffer
| AcReal acReduceVec | ( | const AcReduction | reduction, |
| const VertexBufferHandle | a, | ||
| const VertexBufferHandle | b, | ||
| const VertexBufferHandle | c ) |
Does a vector reduction with vertex buffers where the vector components are (a, b, c)
| AcReal acReduceVecScal | ( | const AcReduction | reduction, |
| const VertexBufferHandle | a, | ||
| const VertexBufferHandle | b, | ||
| const VertexBufferHandle | c, | ||
| const VertexBufferHandle | d ) |
Does a reduction for an operation which requires a vector and a scalar with vertex buffers
Sets the whole mesh to some value
Stores the AcMesh distributed among the devices visible to the caller back to the host
Stores a subset of the mesh stored across the devices visible to the caller back to host memory.
| AcResult acSynchronize | ( | void | ) |
| AcResult acSynchronizeMesh | ( | void | ) |