Astaroth  2.2
device.cc File Reference
#include "astaroth.h"
#include <string.h>
#include "astaroth_utils.h"
#include "errchk.h"
#include "math_utils.h"
#include "timer_hires.h"
#include "kernels/kernels.h"
+ Include dependency graph for device.cc:

Macros

#define ARRAY_SIZE(arr)   (sizeof(arr) / sizeof(arr[0]))
 
#define MPI_GPUDIRECT_DISABLED   (0)
 

Functions

AcResult acDevicePrintInfo (const Device device)
 
AcResult acDeviceAutoOptimize (const Device device)
 
AcResult acDeviceSynchronizeStream (const Device device, const Stream stream)
 
AcResult acDeviceCreate (const int id, const AcMeshInfo device_config, Device *device_handle)
 
AcResult acDeviceDestroy (Device device)
 
AcResult acDeviceSwapBuffers (const Device device)
 
AcResult acDeviceLoadScalarArray (const Device device, const Stream stream, const ScalarArrayHandle handle, const size_t start, const AcReal *data, const size_t num)
 
AcResult acDeviceLoadVertexBufferWithOffset (const Device device, const Stream stream, const AcMesh host_mesh, const VertexBufferHandle vtxbuf_handle, const int3 src, const int3 dst, const int num_vertices)
 
AcResult acDeviceLoadMeshWithOffset (const Device device, const Stream stream, const AcMesh host_mesh, const int3 src, const int3 dst, const int num_vertices)
 
AcResult acDeviceLoadVertexBuffer (const Device device, const Stream stream, const AcMesh host_mesh, const VertexBufferHandle vtxbuf_handle)
 
AcResult acDeviceLoadMesh (const Device device, const Stream stream, const AcMesh host_mesh)
 
AcResult acDeviceStoreVertexBufferWithOffset (const Device device, const Stream stream, const VertexBufferHandle vtxbuf_handle, const int3 src, const int3 dst, const int num_vertices, AcMesh *host_mesh)
 
AcResult acDeviceStoreMeshWithOffset (const Device device, const Stream stream, const int3 src, const int3 dst, const int num_vertices, AcMesh *host_mesh)
 
AcResult acDeviceStoreVertexBuffer (const Device device, const Stream stream, const VertexBufferHandle vtxbuf_handle, AcMesh *host_mesh)
 
AcResult acDeviceStoreMesh (const Device device, const Stream stream, AcMesh *host_mesh)
 
AcResult acDeviceTransferVertexBufferWithOffset (const Device src_device, const Stream stream, const VertexBufferHandle vtxbuf_handle, const int3 src, const int3 dst, const int num_vertices, Device dst_device)
 
AcResult acDeviceTransferMeshWithOffset (const Device src_device, const Stream stream, const int3 src, const int3 dst, const int num_vertices, Device dst_device)
 
AcResult acDeviceTransferVertexBuffer (const Device src_device, const Stream stream, const VertexBufferHandle vtxbuf_handle, Device dst_device)
 
AcResult acDeviceTransferMesh (const Device src_device, const Stream stream, Device dst_device)
 
AcResult acDeviceIntegrateSubstep (const Device device, const Stream stream, const int step_number, const int3 start, const int3 end, const AcReal dt)
 
AcResult acDevicePeriodicBoundcondStep (const Device device, const Stream stream, const VertexBufferHandle vtxbuf_handle, const int3 start, const int3 end)
 
AcResult acDevicePeriodicBoundconds (const Device device, const Stream stream, const int3 start, const int3 end)
 
AcResult acDeviceReduceScal (const Device device, const Stream stream, const ReductionType rtype, const VertexBufferHandle vtxbuf_handle, AcReal *result)
 
AcResult acDeviceReduceVec (const Device device, const Stream stream, const ReductionType rtype, const VertexBufferHandle vtxbuf0, const VertexBufferHandle vtxbuf1, const VertexBufferHandle vtxbuf2, AcReal *result)
 
AcResult acDeviceRunMPITest (void)
 

Macro Definition Documentation

◆ ARRAY_SIZE

#define ARRAY_SIZE (   arr)    (sizeof(arr) / sizeof(arr[0]))

◆ MPI_GPUDIRECT_DISABLED

#define MPI_GPUDIRECT_DISABLED   (0)

Function Documentation

◆ acDeviceAutoOptimize()

AcResult acDeviceAutoOptimize ( const Device  device)

◆ acDeviceCreate()

AcResult acDeviceCreate ( const int  id,
const AcMeshInfo  device_config,
Device device_handle 
)

◆ acDeviceDestroy()

AcResult acDeviceDestroy ( Device  device)

◆ acDeviceIntegrateSubstep()

AcResult acDeviceIntegrateSubstep ( const Device  device,
const Stream  stream,
const int  step_number,
const int3  start,
const int3  end,
const AcReal  dt 
)

◆ acDeviceLoadMesh()

AcResult acDeviceLoadMesh ( const Device  device,
const Stream  stream,
const AcMesh  host_mesh 
)

◆ acDeviceLoadMeshWithOffset()

AcResult acDeviceLoadMeshWithOffset ( const Device  device,
const Stream  stream,
const AcMesh  host_mesh,
const int3  src,
const int3  dst,
const int  num_vertices 
)

Deprecated

◆ acDeviceLoadScalarArray()

AcResult acDeviceLoadScalarArray ( const Device  device,
const Stream  stream,
const ScalarArrayHandle  handle,
const size_t  start,
const AcReal data,
const size_t  num 
)

◆ acDeviceLoadVertexBuffer()

AcResult acDeviceLoadVertexBuffer ( const Device  device,
const Stream  stream,
const AcMesh  host_mesh,
const VertexBufferHandle  vtxbuf_handle 
)

◆ acDeviceLoadVertexBufferWithOffset()

AcResult acDeviceLoadVertexBufferWithOffset ( const Device  device,
const Stream  stream,
const AcMesh  host_mesh,
const VertexBufferHandle  vtxbuf_handle,
const int3  src,
const int3  dst,
const int  num_vertices 
)

◆ acDevicePeriodicBoundconds()

AcResult acDevicePeriodicBoundconds ( const Device  device,
const Stream  stream,
const int3  start,
const int3  end 
)

◆ acDevicePeriodicBoundcondStep()

AcResult acDevicePeriodicBoundcondStep ( const Device  device,
const Stream  stream,
const VertexBufferHandle  vtxbuf_handle,
const int3  start,
const int3  end 
)

◆ acDevicePrintInfo()

AcResult acDevicePrintInfo ( const Device  device)

! printf(" Total const mem: %ld KiB\n", props.totalConstMem / (1024)); ! printf(" Shared mem per block: %ld KiB\n", props.sharedMemPerBlock / (1024));

◆ acDeviceReduceScal()

AcResult acDeviceReduceScal ( const Device  device,
const Stream  stream,
const ReductionType  rtype,
const VertexBufferHandle  vtxbuf_handle,
AcReal result 
)

◆ acDeviceReduceVec()

AcResult acDeviceReduceVec ( const Device  device,
const Stream  stream,
const ReductionType  rtype,
const VertexBufferHandle  vtxbuf0,
const VertexBufferHandle  vtxbuf1,
const VertexBufferHandle  vtxbuf2,
AcReal result 
)

◆ acDeviceRunMPITest()

AcResult acDeviceRunMPITest ( void  )

◆ acDeviceStoreMesh()

AcResult acDeviceStoreMesh ( const Device  device,
const Stream  stream,
AcMesh host_mesh 
)

◆ acDeviceStoreMeshWithOffset()

AcResult acDeviceStoreMeshWithOffset ( const Device  device,
const Stream  stream,
const int3  src,
const int3  dst,
const int  num_vertices,
AcMesh host_mesh 
)

Deprecated

◆ acDeviceStoreVertexBuffer()

AcResult acDeviceStoreVertexBuffer ( const Device  device,
const Stream  stream,
const VertexBufferHandle  vtxbuf_handle,
AcMesh host_mesh 
)

◆ acDeviceStoreVertexBufferWithOffset()

AcResult acDeviceStoreVertexBufferWithOffset ( const Device  device,
const Stream  stream,
const VertexBufferHandle  vtxbuf_handle,
const int3  src,
const int3  dst,
const int  num_vertices,
AcMesh host_mesh 
)

◆ acDeviceSwapBuffers()

AcResult acDeviceSwapBuffers ( const Device  device)

◆ acDeviceSynchronizeStream()

AcResult acDeviceSynchronizeStream ( const Device  device,
const Stream  stream 
)

◆ acDeviceTransferMesh()

AcResult acDeviceTransferMesh ( const Device  src_device,
const Stream  stream,
Device  dst_device 
)

◆ acDeviceTransferMeshWithOffset()

AcResult acDeviceTransferMeshWithOffset ( const Device  src_device,
const Stream  stream,
const int3  src,
const int3  dst,
const int  num_vertices,
Device  dst_device 
)

◆ acDeviceTransferVertexBuffer()

AcResult acDeviceTransferVertexBuffer ( const Device  src_device,
const Stream  stream,
const VertexBufferHandle  vtxbuf_handle,
Device  dst_device 
)

◆ acDeviceTransferVertexBufferWithOffset()

AcResult acDeviceTransferVertexBufferWithOffset ( const Device  src_device,
const Stream  stream,
const VertexBufferHandle  vtxbuf_handle,
const int3  src,
const int3  dst,
const int  num_vertices,
Device  dst_device 
)