Auto-format of astaroth.h

This commit is contained in:
jpekkila
2021-02-07 19:53:49 +02:00
parent 2dbf703c59
commit f697b53b01

View File

@@ -46,13 +46,16 @@ typedef struct {
} AcMatrix; } AcMatrix;
#include "user_defines.h" // Autogenerated defines from the DSL #include "user_defines.h" // Autogenerated defines from the DSL
//#include "../src/core/kernels/kernels.h"
typedef enum { AC_SUCCESS = 0, AC_FAILURE = 1 } AcResult; typedef enum { AC_SUCCESS = 0, AC_FAILURE = 1 } AcResult;
// Neming the associated number of the boundary condition types // Naming the associated number of the boundary condition types
typedef enum { AC_BOUNDCOND_PERIODIC = 0, typedef enum {
AC_BOUNDCOND_SYMMETRIC = 1, AC_BOUNDCOND_PERIODIC = 0,
AC_BOUNDCOND_ANTISYMMETRIC = 2 } AcBoundcond; AC_BOUNDCOND_SYMMETRIC = 1,
AC_BOUNDCOND_ANTISYMMETRIC = 2
} AcBoundcond;
#define AC_GEN_ID(X) X, #define AC_GEN_ID(X) X,
typedef enum { typedef enum {
@@ -255,10 +258,11 @@ AcReal acReduceScal(const ReductionType rtype, const VertexBufferHandle vtxbuf_h
AcReal acReduceVec(const ReductionType rtype, const VertexBufferHandle a, AcReal acReduceVec(const ReductionType rtype, const VertexBufferHandle a,
const VertexBufferHandle b, const VertexBufferHandle c); const VertexBufferHandle b, const VertexBufferHandle c);
/** Does a reduction for an operation which requires a vector and a scalar with vertex buffers /** 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) */ * * where the vector components are (a, b, c) and scalr is (d) */
AcReal acReduceVecScal(const ReductionType rtype, const VertexBufferHandle a, AcReal acReduceVecScal(const ReductionType rtype, const VertexBufferHandle a,
const VertexBufferHandle b, const VertexBufferHandle c, const VertexBufferHandle d); const VertexBufferHandle b, const VertexBufferHandle c,
const VertexBufferHandle d);
/** Stores a subset of the mesh stored across the devices visible to the caller back to host memory. /** Stores a subset of the mesh stored across the devices visible to the caller back to host memory.
*/ */
@@ -325,7 +329,7 @@ AcResult acGridIntegrate(const Stream stream, const AcReal dt);
/** */ /** */
/* MV: Commented out for a while, but save for the future when standalone_MPI /* MV: Commented out for a while, but save for the future when standalone_MPI
works with periodic boundary conditions. works with periodic boundary conditions.
AcResult AcResult
acGridIntegrateNonperiodic(const Stream stream, const AcReal dt) acGridIntegrateNonperiodic(const Stream stream, const AcReal dt)
@@ -436,7 +440,8 @@ AcResult acNodeLoadVertexBuffer(const Node node, const Stream stream, const AcMe
AcResult acNodeLoadMesh(const Node node, const Stream stream, const AcMesh host_mesh); AcResult acNodeLoadMesh(const Node node, const Stream stream, const AcMesh host_mesh);
/** */ /** */
AcResult acNodeSetVertexBuffer(const Node node, const Stream stream, const VertexBufferHandle handle, const AcReal value); AcResult acNodeSetVertexBuffer(const Node node, const Stream stream,
const VertexBufferHandle handle, const AcReal value);
/** Deprecated ? */ /** Deprecated ? */
AcResult acNodeStoreVertexBufferWithOffset(const Node node, const Stream stream, AcResult acNodeStoreVertexBufferWithOffset(const Node node, const Stream stream,
@@ -473,8 +478,9 @@ AcResult acNodePeriodicBoundcondStep(const Node node, const Stream stream,
AcResult acNodePeriodicBoundconds(const Node node, const Stream stream); AcResult acNodePeriodicBoundconds(const Node node, const Stream stream);
/** */ /** */
AcResult acNodeGeneralBoundcondStep(const Node node, const Stream stream, AcResult acNodeGeneralBoundcondStep(const Node node, const Stream stream,
const VertexBufferHandle vtxbuf_handle, const AcMeshInfo config); const VertexBufferHandle vtxbuf_handle,
const AcMeshInfo config);
/** */ /** */
AcResult acNodeGeneralBoundconds(const Node node, const Stream stream, const AcMeshInfo config); AcResult acNodeGeneralBoundconds(const Node node, const Stream stream, const AcMeshInfo config);
@@ -489,8 +495,8 @@ AcResult acNodeReduceVec(const Node node, const Stream stream_type, const Reduct
/** */ /** */
AcResult acNodeReduceVecScal(const Node node, const Stream stream_type, const ReductionType rtype, AcResult acNodeReduceVecScal(const Node node, const Stream stream_type, const ReductionType rtype,
const VertexBufferHandle vtxbuf0, const VertexBufferHandle vtxbuf1, const VertexBufferHandle vtxbuf0, const VertexBufferHandle vtxbuf1,
const VertexBufferHandle vtxbuf2, const VertexBufferHandle vtxbuf3, AcReal* result); const VertexBufferHandle vtxbuf2, const VertexBufferHandle vtxbuf3,
AcReal* result);
/* /*
* ============================================================================= * =============================================================================
@@ -561,7 +567,8 @@ AcResult acDeviceLoadVertexBuffer(const Device device, const Stream stream, cons
AcResult acDeviceLoadMesh(const Device device, const Stream stream, const AcMesh host_mesh); AcResult acDeviceLoadMesh(const Device device, const Stream stream, const AcMesh host_mesh);
/** */ /** */
AcResult acDeviceSetVertexBuffer(const Device device, const Stream stream, const VertexBufferHandle handle, const AcReal value); AcResult acDeviceSetVertexBuffer(const Device device, const Stream stream,
const VertexBufferHandle handle, const AcReal value);
/** */ /** */
AcResult acDeviceStoreVertexBufferWithOffset(const Device device, const Stream stream, AcResult acDeviceStoreVertexBufferWithOffset(const Device device, const Stream stream,
@@ -619,7 +626,6 @@ AcResult acDeviceGeneralBoundcondStep(const Device device, const Stream stream,
AcResult acDeviceGeneralBoundconds(const Device device, const Stream stream, const int3 start, AcResult acDeviceGeneralBoundconds(const Device device, const Stream stream, const int3 start,
const int3 end, const AcMeshInfo config, const int3 bindex); const int3 end, const AcMeshInfo config, const int3 bindex);
/** */ /** */
AcResult acDeviceReduceScal(const Device device, const Stream stream, const ReductionType rtype, AcResult acDeviceReduceScal(const Device device, const Stream stream, const ReductionType rtype,
const VertexBufferHandle vtxbuf_handle, AcReal* result); const VertexBufferHandle vtxbuf_handle, AcReal* result);
@@ -628,9 +634,10 @@ AcResult acDeviceReduceVec(const Device device, const Stream stream_type, const
const VertexBufferHandle vtxbuf0, const VertexBufferHandle vtxbuf1, const VertexBufferHandle vtxbuf0, const VertexBufferHandle vtxbuf1,
const VertexBufferHandle vtxbuf2, AcReal* result); const VertexBufferHandle vtxbuf2, AcReal* result);
/** */ /** */
AcResult acDeviceReduceVecScal(const Device device, const Stream stream_type, const ReductionType rtype, AcResult acDeviceReduceVecScal(const Device device, const Stream stream_type,
const VertexBufferHandle vtxbuf0, const VertexBufferHandle vtxbuf1, const ReductionType rtype, const VertexBufferHandle vtxbuf0,
const VertexBufferHandle vtxbuf2, const VertexBufferHandle vtxbuf3, AcReal* result); const VertexBufferHandle vtxbuf1, const VertexBufferHandle vtxbuf2,
const VertexBufferHandle vtxbuf3, AcReal* result);
/** */ /** */
AcResult acDeviceRunMPITest(void); AcResult acDeviceRunMPITest(void);