Astaroth  3.1
Scalable Multi-GPU Stencil Computations
Loading...
Searching...
No Matches
astaroth_legacy.h File Reference
#include "acc_runtime.h"
#include "astaroth_base.h"
#include "func_define.h"
#include "host_datatypes.h"
Include dependency graph for astaroth_legacy.h:
This graph shows which files directly or indirectly include this file:

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)

Function Documentation

◆ acBoundcondStep()

AcResult acBoundcondStep ( void )

Applies periodic boundary conditions for the Mesh distributed among the devices visible to the caller

◆ acBoundcondStepGBC()

AcResult acBoundcondStepGBC ( const AcMeshInfo config)

Applies general outer boundary conditions for the Mesh distributed among the devices visible to the caller

◆ acCheckDeviceAvailability()

AcResult acCheckDeviceAvailability ( void )

◆ acGetFieldHandle()

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:

size_t handle;
AcResult res = acGetFieldHandle("VTXBUF_LNRHO", &handle);
if (res != AC_SUCCESS)
fprintf(stderr, "Handle not found\n");
AcResult acGetFieldHandle(const char *field, size_t *handle)
AcResult
Definition host_datatypes.h:10
@ AC_SUCCESS
Definition host_datatypes.h:10

◆ acGetNode()

Node acGetNode ( void )

◆ acGetNumDevicesPerNode()

int acGetNumDevicesPerNode ( void )

◆ acInit()

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.

◆ acIntegrate()

AcResult acIntegrate ( 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.

◆ acIntegrateGBC()

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.

◆ acIntegrateStep()

AcResult acIntegrateStep ( const int isubstep,
const AcReal dt )

Will potentially be deprecated in later versions. Added only to fix backwards compatibility with PC for now.

◆ acIntegrateStepWithOffset()

AcResult acIntegrateStepWithOffset ( const int isubstep,
const AcReal dt,
const Volume start,
const Volume end )

◆ acLoad()

AcResult acLoad ( const AcMesh host_mesh)

Loads an AcMesh to the devices visible to the caller

◆ acLoadDeviceConstant()

AcResult acLoadDeviceConstant ( const AcRealParam param,
const AcReal value )

Loads a constant to the memories of the devices visible to the caller

◆ acLoadWithOffset()

AcResult acLoadWithOffset ( const AcMesh host_mesh,
const int3 src,
const int num_vertices )

◆ acQuit()

AcResult acQuit ( void )

Frees all GPU allocations and resets all devices in the node. Should be called at exit.

◆ acReduceScal()

AcReal acReduceScal ( const AcReduction reduction,
const VertexBufferHandle vtxbuf_handle )

Does a scalar reduction with the data stored in some vertex buffer

◆ acReduceVec()

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)

◆ acReduceVecScal()

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

  • where the vector components are (a, b, c) and scalr is (d)

◆ acSetVertexBuffer()

AcResult acSetVertexBuffer ( const VertexBufferHandle handle,
const AcReal value )

Sets the whole mesh to some value

◆ acStore()

AcResult acStore ( AcMesh * host_mesh)

Stores the AcMesh distributed among the devices visible to the caller back to the host

◆ acStoreWithOffset()

AcResult acStoreWithOffset ( const int3 dst,
const size_t num_vertices,
AcMesh * host_mesh )

Stores a subset of the mesh stored across the devices visible to the caller back to host memory.

◆ acSynchronize()

AcResult acSynchronize ( void )

◆ acSynchronizeMesh()

AcResult acSynchronizeMesh ( void )

◆ acSynchronizeStream()

AcResult acSynchronizeStream ( const Stream stream)

Synchronizes a specific stream. All streams are synchronized if STREAM_ALL is passed as a parameter