Astaroth  2.2
astaroth.cc File Reference
#include "astaroth.h"
#include "errchk.h"
#include "math_utils.h"
+ Include dependency graph for astaroth.cc:

Functions

AcResult acInit (const AcMeshInfo mesh_info)
 
AcResult acQuit (void)
 
AcResult acCheckDeviceAvailability (void)
 
AcResult acSynchronize (void)
 
AcResult acSynchronizeStream (const Stream stream)
 
AcResult acLoadDeviceConstant (const AcRealParam param, const AcReal value)
 
AcResult acLoad (const AcMesh host_mesh)
 
AcResult acStore (AcMesh *host_mesh)
 
AcResult acIntegrate (const AcReal dt)
 
AcResult acIntegrateStep (const int isubstep, const AcReal dt)
 
AcResult acIntegrateStepWithOffset (const int isubstep, const AcReal dt, const int3 start, const int3 end)
 
AcResult acBoundcondStep (void)
 
AcReal acReduceScal (const ReductionType rtype, const VertexBufferHandle vtxbuf_handle)
 
AcReal acReduceVec (const ReductionType rtype, const VertexBufferHandle a, const VertexBufferHandle b, const VertexBufferHandle c)
 
AcResult acStoreWithOffset (const int3 dst, const size_t num_vertices, AcMesh *host_mesh)
 
AcResult acLoadWithOffset (const AcMesh host_mesh, const int3 src, const int num_vertices)
 
AcResult acSynchronizeMesh (void)
 
int acGetNumDevicesPerNode (void)
 
Node acGetNode (void)
 

Function Documentation

◆ acBoundcondStep()

AcResult acBoundcondStep ( void  )

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

◆ acCheckDeviceAvailability()

AcResult acCheckDeviceAvailability ( void  )

Checks whether there are any CUDA devices available. Returns AC_SUCCESS if there is 1 or more, AC_FAILURE otherwise.

◆ 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.

◆ 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 int3  start,
const int3  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 ReductionType  rtype,
const VertexBufferHandle  vtxbuf_handle 
)

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

◆ acReduceVec()

AcReal acReduceVec ( const ReductionType  rtype,
const VertexBufferHandle  a,
const VertexBufferHandle  b,
const VertexBufferHandle  c 
)

Does a vector reduction with vertex buffers where the vector components are (a, b, c)

◆ 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