Astaroth  3.1
Scalable Multi-GPU Stencil Computations
Loading...
Searching...
No Matches
astaroth_device.h
Go to the documentation of this file.
1#pragma once
2
3#include "astaroth_base.h"
4#include "func_define.h"
5
6/*
7 * =============================================================================
8 * Device interface
9 * =============================================================================
10 */
11
13
14FUNC_DEFINE(AcResult, acDeviceCreate,(const int id, const AcMeshInfo device_config, Device* device));
15
17
20
22
23// AcResult acDeviceAutoOptimize(const Device device);
24
26
27FUNC_DEFINE(AcResult, acDeviceSwapBuffer,(const Device device, const VertexBufferHandle handle));
28
30
31FUNC_DEFINE(AcResult, acDeviceLoadRealReduceRes,(const Device device, const Stream stream, const AcRealOutputParam param, const AcReal value));
32
34 const AcRealParam param, const AcReal value));
36FUNC_DEFINE(AcResult, acDeviceFFTR2C,(const Device device, const Field src, const ComplexField dst));
37FUNC_DEFINE(AcResult, acDeviceFFTC2R,(const Device device, const ComplexField src, const Field dst));
38FUNC_DEFINE(AcResult, acDeviceFFTC2RXY,(const Device device, const Field src, const ComplexField dst, const size_t z_starting_point, const size_t n_layers));
39FUNC_DEFINE(AcResult, acDeviceFFTR2CXY,(const Device device, const Field src, const ComplexField dst, const size_t z_starting_point, const size_t n_layers));
40FUNC_DEFINE(AcResult, acDeviceFFTR2Planar,(const Device device, const Field src, const Field real_dst, const Field imag_dst));
41FUNC_DEFINE(AcResult, acDeviceFFTR2PlanarBatched,(const Device device, const Field src, const Field real_dst, const Field imag_dst, const int batch_size));
42FUNC_DEFINE(AcResult, acDeviceFFTR2HermitianPlanarBatched,(const Device device, const Field src, const Field real_dst, const Field imag_dst, const int batch_size, Stream stream));
43FUNC_DEFINE(AcResult, acDeviceFFTBackwardTransformPlanar,(const Device device, const Field real_src, const Field imag_src, const Field real_dst,const Field imag_dst));
44FUNC_DEFINE(AcResult, acDeviceFFTBackwardTransformPlanar2R,(const Device device, const Field real_src, const Field imag_src, const Field real));
45FUNC_DEFINE(AcResult, acDeviceFFTR2PlanarXY,(const Device device, const Field src, const Field real_dst, const Field imag_dst, const size_t z_offset));
46FUNC_DEFINE(AcResult, acDeviceFFTBackwardTransformPlanar2RXY,(const Device device, const Field real_src, const Field imag_src, const Field dst, const size_t z_offset));
47
49 const AcReal3Param param, const AcReal3 value));
50
51FUNC_DEFINE(AcResult, acDeviceLoadIntUniform,(const Device device, const Stream stream, const AcIntParam param,
52 const int value));
53FUNC_DEFINE(AcResult, acDeviceLoadBoolUniform,(const Device device, const Stream stream, const AcBoolParam param,
54 const bool value));
55
56FUNC_DEFINE(AcResult, acDeviceLoadInt3Uniform,(const Device device, const Stream stream, const AcInt3Param param,
57 const int3 value));
58
60 const AcRealParam param, AcReal* value));
61
63 const AcReal3Param param, AcReal3* value));
64
65FUNC_DEFINE(AcResult, acDeviceLoadMeshInfo,(const Device device, const AcMeshInfo device_config));
66
67
69 const AcMesh host_mesh,
70 const VertexBufferHandle vtxbuf_handle, const int3 src,
71 const int3 dst, const int num_vertices));
72
75 const AcMesh host_mesh, const int3 src, const int3 dst,
76 const int num_vertices));
77
78FUNC_DEFINE(AcResult, acDeviceLoadVertexBuffer,(const Device device, const Stream stream, const AcMesh host_mesh,
79 const VertexBufferHandle vtxbuf_handle));
80
81FUNC_DEFINE(AcResult, acDeviceLoadMesh,(const Device device, const Stream stream, const AcMesh host_mesh));
82
83
84#define DEVICE_LOAD_ARRAY_DECL(ENUM,DEF_NAME) \
85 FUNC_DEFINE(AcResult, acDeviceLoad##DEF_NAME##Array,(const Device device, const Stream stream, const AcMeshInfo host_info, const ENUM array));
86
87#include "device_load_uniform_decl.h"
88#define DECL_DEVICE_STORE_UNIFORM(PARAM_TYPE,VAL_TYPE,VAL_TYPE_UPPER_CASE) \
89 FUNC_DEFINE(AcResult,acDeviceStore##VAL_TYPE_UPPER_CASE##Uniform,(const Device device, const Stream stream, const PARAM_TYPE param, VAL_TYPE* value));
90#define DECL_DEVICE_STORE_ARRAY(PARAM_TYPE,VAL_TYPE,VAL_TYPE_UPPER_CASE) \
91 FUNC_DEFINE(AcResult,acDeviceStore##VAL_TYPE_UPPER_CASE##Array,(const Device device, const Stream stream, const PARAM_TYPE param, VAL_TYPE* value));
92#include "device_store_uniform_decl.h"
93
94
96 const VertexBufferHandle handle, const AcReal value));
97
99
101 const VertexBufferHandle vtxbuf_handle, const int3 src,
102 const int3 dst, const int num_vertices,
103 AcMesh* host_mesh));
105
106FUNC_DEFINE(acKernelInputParams*, acDeviceGetKernelInputParamsObject,(const Device device));
107
108
110FUNC_DEFINE(AcResult, acDeviceStoreMeshWithOffset,(const Device device, const Stream stream, const int3 src,
111 const int3 dst, const int num_vertices, AcMesh* host_mesh));
112
114 const VertexBufferHandle vtxbuf_handle, AcMesh* host_mesh));
115
116FUNC_DEFINE(AcResult, acDeviceStoreMesh,(const Device device, const Stream stream, AcMesh* host_mesh));
117
118
120 const VertexBufferHandle vtxbuf_handle,
121 const int3 src, const int3 dst,
122 const int num_vertices, Device dst_device));
123
126 const int3 src, const int3 dst, const int num_vertices,
127 Device dst_device));
128
130 const VertexBufferHandle vtxbuf_handle, Device dst_device));
131
132FUNC_DEFINE(AcResult, acDeviceTransferMesh,(const Device src_device, const Stream stream, Device dst_device));
133
134FUNC_DEFINE(AcResult, acDeviceIntegrateSubstep,(const Device device, const Stream stream, const int step_number,
135 const Volume start, const Volume end, const AcReal dt));
137 const VertexBufferHandle vtxbuf_handle, const Volume start,
138 const Volume end));
139
140FUNC_DEFINE(AcResult, acDevicePeriodicBoundconds,(const Device device, const Stream stream, const Volume start,
141 const Volume end));
142
144 const VertexBufferHandle vtxbuf_handle, const Volume start,
145 const Volume end, const AcMeshInfo config, const int3 bindex));
146
147FUNC_DEFINE(AcResult, acDeviceGeneralBoundconds,(const Device device, const Stream stream, const Volume start,
148 const Volume end, const AcMeshInfo config, const int3 bindex));
149
151 const AcReduction reduction,
152 const VertexBufferHandle vtxbuf_handle, AcReal* result));
153
154FUNC_DEFINE(AcResult, acDeviceReduceScal,(const Device device, const Stream stream, const AcReduction reduction,
155 const VertexBufferHandle vtxbuf_handle, AcReal* result));
156
157FUNC_DEFINE(AcResult, acDeviceReduceVecNoPostProcessing,(const Device device, const Stream stream_type,
158 const AcReduction reduction, const VertexBufferHandle vtxbuf0,
159 const VertexBufferHandle vtxbuf1,
160 const VertexBufferHandle vtxbuf2, AcReal* result));
161
162FUNC_DEFINE(AcResult, acDeviceReduceVec,(const Device device, const Stream stream_type, const AcReduction reduction,
163 const VertexBufferHandle vtxbuf0, const VertexBufferHandle vtxbuf1,
164 const VertexBufferHandle vtxbuf2, AcReal* result));
165
167 const AcReduction reduction,
168 const VertexBufferHandle vtxbuf0,
169 const VertexBufferHandle vtxbuf1,
170 const VertexBufferHandle vtxbuf2,
171 const VertexBufferHandle vtxbuf3, AcReal* result));
172
173FUNC_DEFINE(AcResult, acDeviceReduceVecScal,(const Device device, const Stream stream_type,
174 const AcReduction reduction, const VertexBufferHandle vtxbuf0,
175 const VertexBufferHandle vtxbuf1, const VertexBufferHandle vtxbuf2,
176 const VertexBufferHandle vtxbuf3, AcReal* result));
177
178FUNC_DEFINE(AcResult, acDeviceReduceXY,(const Device device, const Stream stream, const Field field,
179 const Profile profile, const AcReduction reduction));
181
182FUNC_DEFINE(AcResult, acDeviceSwapProfileBuffer,(const Device device, const Profile handle));
183FUNC_DEFINE(AcResult, acDeviceReduceAverages,(const Device device, const Stream stream, const Profile prof));
185
186static UNUSED AcBuffer
187acDeviceTranspose(const Device device, const Stream stream, const AcMeshOrder order, const AcReal* src)
188{
189 return acDeviceTransposeBase(device,stream,order,src);
190}
191FUNC_DEFINE(AcBuffer, acDeviceTransposeVertexBuffer,(const Device device, const Stream stream, const AcMeshOrder order, const VertexBufferHandle vtxbuf));
192
193
194FUNC_DEFINE(AcResult, acDeviceSwapProfileBuffers,(const Device device, const Profile* profiles,
195 const size_t num_profiles));
196
198
199FUNC_DEFINE(AcResult, acDeviceLoadProfile,(const Device device, const AcReal* hostprofile,
200 const size_t hostprofile_count, const Profile profile));
201
202FUNC_DEFINE(AcResult, acDeviceStoreProfile,(const Device device, const Profile profile, AcMesh* host_mesh));
203
204FUNC_DEFINE(AcResult, acDeviceFinishReduceReal,(Device device, const Stream stream, AcReal* result,const AcKernel kernel, const AcReduceOp reduce_op, const AcRealOutputParam output));
205#if AC_DOUBLE_PRECISION
206
207FUNC_DEFINE(AcResult, acDeviceFinishReduceFloat,(Device device, const Stream stream, float* result,const AcKernel kernel, const AcReduceOp reduce_op, const AcFloatOutputParam output));
208#endif
209FUNC_DEFINE(AcResult, acDeviceFinishReduceInt,(Device device, const Stream stream, int* result,const AcKernel kernel, const AcReduceOp reduce_op, const AcIntOutputParam output));
210FUNC_DEFINE(AcResult, acDeviceFinishReduceRealStream,(Device device, const cudaStream_t stream, AcReal* result,const AcKernel kernel, const AcReduceOp reduce_op, const AcRealOutputParam output));
211#if AC_DOUBLE_PRECISION
212
213FUNC_DEFINE(AcResult, acDeviceFinishReduceFloatStream,(Device device, const cudaStream_t stream, float* result,const AcKernel kernel, const AcReduceOp reduce_op, const AcFloatOutputParam output));
214#endif
215FUNC_DEFINE(AcResult, acDeviceFinishReduceIntStream,(Device device, const cudaStream_t stream, int* result,const AcKernel kernel, const AcReduceOp reduce_op, const AcIntOutputParam output));
216FUNC_DEFINE(AcResult,acDevicePreprocessScratchPad,(Device device, const int variable, const AcType type,const AcReduceOp op));
217
219
221
222
223FUNC_DEFINE(AcResult, acDeviceLaunchKernel,(const Device device, const Stream stream, const AcKernel kernel,
224 const Volume start, const Volume end));
225FUNC_DEFINE(AcResult, acDeviceSetReduceOffset,(const Device device, const AcKernel kernel,
226 const Volume start, const Volume end));
227
228FUNC_DEFINE(AcResult, acDeviceBenchmarkKernel,(const Device device, const AcKernel kernel, const int3 start,
229 const int3 end));
231
232FUNC_DEFINE(AcResult, acDeviceLoadStencil,(const Device device, const Stream stream, const Stencil stencil,const AcReal data[STENCIL_DEPTH][STENCIL_HEIGHT][STENCIL_WIDTH]));
233FUNC_DEFINE(AcResult, acDeviceLoadStencils,(const Device device, const Stream stream, const AcReal data[NUM_STENCILS][STENCIL_DEPTH][STENCIL_HEIGHT][STENCIL_WIDTH]));
234FUNC_DEFINE(AcResult, acDeviceStoreStencil,(const Device device, const Stream stream, const Stencil stencil,AcReal data[STENCIL_DEPTH][STENCIL_HEIGHT][STENCIL_WIDTH]));
235
236FUNC_DEFINE(AcResult, acDeviceVolumeCopy,(const Device device, const Stream stream,const AcReal* in, const Volume in_offset, const Volume in_volume,AcReal* out, const Volume out_offset, const Volume out_volume));
237
238FUNC_DEFINE(AcResult, acDeviceLoadPlateBuffer,(const Device device, int3 start, int3 end, const Stream stream,
239 AcReal* buffer, int plate));
240
241FUNC_DEFINE(AcResult, acDeviceStorePlateBuffer,(const Device device, int3 start, int3 end, const Stream stream,
242 AcReal* buffer, int plate));
243
244FUNC_DEFINE(AcResult, acDeviceStoreIXYPlate,(const Device device, int3 start, int3 end, int src_offset, const Stream stream,
245 AcMesh *host_mesh));
246
248
249FUNC_DEFINE(AcResult, acDeviceGetVertexBufferPtrs,(Device device, const VertexBufferHandle vtxbuf, AcReal** in, AcReal** out));
250FUNC_DEFINE(AcResult, acDeviceMemGetInfo,(const Device device, size_t* free_mem, size_t* total_mem));
251
252AcResult acDeviceWriteMeshToDisk(const Device device, const VertexBufferHandle vtxbuf,
253 const char* filepath);
254
255#include "device_set_input_decls.h"
256#include "device_get_output_decls.h"
257#include "device_get_input_decls.h"
258
260
261#ifdef __cplusplus
262
263static UNUSED AcResult
264acDeviceFinishReduce(Device device, const Stream stream, int* result,const AcKernel kernel, const AcReduceOp reduce_op, const AcIntOutputParam output)
265{
266 return acDeviceFinishReduceInt(device,stream,result,kernel,reduce_op,output);
267}
268
269static UNUSED AcResult
270acDeviceFinishReduce(Device device, const cudaStream_t stream, int* result,const AcKernel kernel, const AcReduceOp reduce_op, const AcIntOutputParam output)
271{
272 return acDeviceFinishReduceIntStream(device,stream,result,kernel,reduce_op,output);
273}
274
275static UNUSED AcResult
276acDeviceFinishReduce(Device device, const Stream stream, AcReal* result,const AcKernel kernel, const AcReduceOp reduce_op, const AcRealOutputParam output)
277{
278 return acDeviceFinishReduceReal(device,stream,result,kernel,reduce_op,output);
279}
280
281static UNUSED AcResult
282acDeviceFinishReduce(Device device, const cudaStream_t stream, AcReal* result,const AcKernel kernel, const AcReduceOp reduce_op, const AcRealOutputParam output)
283{
284 return acDeviceFinishReduceRealStream(device,stream,result,kernel,reduce_op,output);
285}
286
287#if AC_DOUBLE_PRECISION
288static UNUSED AcResult
289acDeviceFinishReduce(Device device, const Stream stream, float* result,const AcKernel kernel, const AcReduceOp reduce_op, const AcFloatOutputParam output)
290{
291 return acDeviceFinishReduceFloat(device,stream,result,kernel,reduce_op,output);
292}
293
294static UNUSED AcResult
295acDeviceFinishReduce(Device device, const cudaStream_t stream, float* result,const AcKernel kernel, const AcReduceOp reduce_op, const AcFloatOutputParam output)
296{
297 return acDeviceFinishReduceFloatStream(device,stream,result,kernel,reduce_op,output);
298}
299#endif
300
301static UNUSED AcBuffer
302acDeviceTranspose(const Device device, const Stream stream, const AcMeshOrder order, const VertexBufferHandle vtxbuf)
303{
304 return acDeviceTransposeVertexBuffer(device,stream,order,vtxbuf);
305}
306
307#define OVERLOAD_DEVICE_STORE_UNIFORM(PARAM_TYPE,VAL_TYPE,VAL_TYPE_UPPER_CASE) \
308 static UNUSED AcResult acDeviceStore(const Device device, const Stream stream, const PARAM_TYPE param, VAL_TYPE* value) { return acDeviceStore##VAL_TYPE_UPPER_CASE##Uniform(device,stream,param,value); }
309#define OVERLOAD_DEVICE_STORE_ARRAY(PARAM_TYPE,VAL_TYPE,VAL_TYPE_UPPER_CASE) \
310 static UNUSED AcResult acDeviceStore(const Device device, const Stream stream, const PARAM_TYPE param, VAL_TYPE* value) { return acDeviceStore##VAL_TYPE_UPPER_CASE##Array(device,stream,param,value); }
311#define OVERLOAD_DEVICE_LOAD_ARRAY(ENUM,DEF_NAME) \
312 static UNUSED AcResult acDeviceLoad(const Device device, const Stream stream, const AcMeshInfo host_info, const ENUM array) { return acDeviceLoad##DEF_NAME##Array(device,stream,host_info,array);}
313
314#include "device_store_overloads.h"
315#include "device_load_uniform_overloads.h"
316#include "device_set_input_overloads.h"
317#include "device_get_input_overloads.h"
318#include "device_get_output_overloads.h"
319
320#endif
float AcReal
Definition acreal.h:11
Stream
Definition astaroth_base.h:47
struct device_s * Device
Definition astaroth_base.h:132
AcResult acDeviceStoreMeshWithOffset(const Device device, const Stream stream, const int3 src, const int3 dst, const int num_vertices, AcMesh *host_mesh)
AcResult acDeviceSetReduceOffset(const Device device, const AcKernel kernel, const Volume start, const Volume end)
AcResult acDeviceUpdate(Device device, const AcMeshInfo info)
AcResult acDeviceStoreIXYPlate(const Device device, int3 start, int3 end, int src_offset, const Stream stream, AcMesh *host_mesh)
AcResult acDeviceReduceScal(const Device device, const Stream stream, const AcReduction reduction, const VertexBufferHandle vtxbuf_handle, AcReal *result)
AcResult acDeviceLoadPlateBuffer(const Device device, int3 start, int3 end, const Stream stream, AcReal *buffer, int plate)
AcResult acDeviceReduceXYAverages(const Device, const Stream)
AcResult acDeviceGetVertexBufferPtrs(Device device, const VertexBufferHandle vtxbuf, AcReal **in, AcReal **out)
AcResult acDeviceReduceVecScal(const Device device, const Stream stream_type, const AcReduction reduction, const VertexBufferHandle vtxbuf0, const VertexBufferHandle vtxbuf1, const VertexBufferHandle vtxbuf2, const VertexBufferHandle vtxbuf3, AcReal *result)
AcResult acDeviceGeneralBoundconds(const Device device, const Stream stream, const Volume start, const Volume end, const AcMeshInfo config, const int3 bindex)
AcResult acDeviceFinishReduceReal(Device device, const Stream stream, AcReal *result, const AcKernel kernel, const AcReduceOp reduce_op, const AcRealOutputParam output)
AcResult acDeviceFFTR2CXY(const Device device, const Field src, const ComplexField dst, const size_t z_starting_point, const size_t n_layers)
AcResult acDeviceFFTC2RXY(const Device device, const Field src, const ComplexField dst, const size_t z_starting_point, const size_t n_layers)
AcResult acDeviceLoadMeshInfo(const Device device, const AcMeshInfo device_config)
AcResult acDeviceFlushOutputBuffers(const Device device, const Stream stream)
AcResult acDevicePeriodicBoundconds(const Device device, const Stream stream, const Volume start, const Volume end)
static const Stream const AcMeshOrder const AcReal * src
Definition astaroth_device.h:188
AcResult acDeviceLoadMesh(const Device device, const Stream stream, const AcMesh host_mesh)
static const Stream const AcMeshOrder order
Definition astaroth_device.h:187
AcBuffer acDeviceTransposeVertexBuffer(const Device device, const Stream stream, const AcMeshOrder order, const VertexBufferHandle vtxbuf)
AcResult acDeviceIntegrateSubstep(const Device device, const Stream stream, const int step_number, const Volume start, const Volume end, const AcReal dt)
AcResult acDevicePrintInfo(const Device device)
AcResult acDeviceFFTR2Planar(const Device device, const Field src, const Field real_dst, const Field imag_dst)
AcMeshInfo acDeviceGetConfig(const Device device)
AcResult acDeviceSynchronizeStream(const Device device, const Stream stream)
AcResult acDeviceLoadStencil(const Device device, const Stream stream, const Stencil stencil, const AcReal data[STENCIL_DEPTH][STENCIL_HEIGHT][STENCIL_WIDTH])
AcResult acDeviceStoreScalarUniform(const Device device, const Stream stream, const AcRealParam param, AcReal *value)
AcResult acDeviceStoreStencil(const Device device, const Stream stream, const Stencil stencil, AcReal data[STENCIL_DEPTH][STENCIL_HEIGHT][STENCIL_WIDTH])
AcResult acDeviceStoreVectorUniform(const Device device, const Stream stream, const AcReal3Param param, AcReal3 *value)
AcResult acDeviceReduceVecScalNoPostProcessing(const Device device, const Stream stream_type, const AcReduction reduction, const VertexBufferHandle vtxbuf0, const VertexBufferHandle vtxbuf1, const VertexBufferHandle vtxbuf2, const VertexBufferHandle vtxbuf3, AcReal *result)
AcDeviceKernelOutput acDeviceGetKernelOutput(const Device device)
AcMeshInfo acDeviceGetLocalConfig(const Device device)
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 acDeviceLoadRealReduceRes(const Device device, const Stream stream, const AcRealOutputParam param, const AcReal value)
AcResult acDeviceStorePlateBuffer(const Device device, int3 start, int3 end, const Stream stream, AcReal *buffer, int plate)
AcResult acDeviceSwapAllProfileBuffers(const Device device)
acKernelInputParams * acDeviceGetKernelInputParamsObject(const Device device)
AcBuffer acDeviceTransposeBase(const Device device, const Stream stream, const AcMeshOrder order, const AcReal *src)
AcResult acDeviceStoreMesh(const Device device, const Stream stream, AcMesh *host_mesh)
AcResult acDeviceFFTR2PlanarXY(const Device device, const Field src, const Field real_dst, const Field imag_dst, const size_t z_offset)
AcResult acDeviceReduceXY(const Device device, const Stream stream, const Field field, const Profile profile, const AcReduction reduction)
AcResult acDeviceSwapProfileBuffer(const Device device, const Profile handle)
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 acDeviceSwapProfileBuffers(const Device device, const Profile *profiles, const size_t num_profiles)
AcResult acDeviceLoadProfile(const Device device, const AcReal *hostprofile, const size_t hostprofile_count, const Profile profile)
AcResult acDeviceFFTR2PlanarBatched(const Device device, const Field src, const Field real_dst, const Field imag_dst, const int batch_size)
AcResult acDeviceLoadIntUniform(const Device device, const Stream stream, const AcIntParam param, const int value)
AcResult acDeviceStoreProfile(const Device device, const Profile profile, AcMesh *host_mesh)
AcResult acDeviceFFTBackwardTransformPlanar2RXY(const Device device, const Field real_src, const Field imag_src, const Field dst, const size_t z_offset)
AcResult acDeviceFinishReduceRealStream(Device device, const cudaStream_t stream, AcReal *result, const AcKernel kernel, const AcReduceOp reduce_op, const AcRealOutputParam output)
AcResult acDeviceLoadStencils(const Device device, const Stream stream, const AcReal data[NUM_STENCILS][STENCIL_DEPTH][STENCIL_HEIGHT][STENCIL_WIDTH])
AcResult acDeviceMemGetInfo(const Device device, size_t *free_mem, size_t *total_mem)
AcResult acDeviceFinishReduceInt(Device device, const Stream stream, int *result, const AcKernel kernel, const AcReduceOp reduce_op, const AcIntOutputParam output)
AcResult acDeviceFFTBackwardTransformPlanar(const Device device, const Field real_src, const Field imag_src, const Field real_dst, const Field imag_dst)
AcResult acDeviceFFTC2R(const Device device, const ComplexField src, const Field dst)
AcResult acDeviceTransferMesh(const Device src_device, const Stream stream, Device dst_device)
AcResult acDevicePreprocessScratchPad(Device device, const int variable, const AcType type, const AcReduceOp op)
AcResult acDeviceReduceVecNoPostProcessing(const Device device, const Stream stream_type, const AcReduction reduction, const VertexBufferHandle vtxbuf0, const VertexBufferHandle vtxbuf1, const VertexBufferHandle vtxbuf2, AcReal *result)
AcResult acDeviceReduceVec(const Device device, const Stream stream_type, const AcReduction reduction, const VertexBufferHandle vtxbuf0, const VertexBufferHandle vtxbuf1, const VertexBufferHandle vtxbuf2, AcReal *result)
AcResult acDeviceLoadVertexBuffer(const Device device, const Stream stream, const AcMesh host_mesh, const VertexBufferHandle vtxbuf_handle)
AcResult acDeviceStoreVertexBuffer(const Device device, const Stream stream, const VertexBufferHandle vtxbuf_handle, AcMesh *host_mesh)
AcResult acDeviceLoadVectorUniform(const Device device, const Stream stream, const AcReal3Param param, const AcReal3 value)
AcResult acDeviceFinishReduceIntStream(Device device, const cudaStream_t stream, int *result, const AcKernel kernel, const AcReduceOp reduce_op, const AcIntOutputParam output)
AcResult acDeviceLoadMeshWithOffset(const Device device, const Stream stream, const AcMesh host_mesh, const int3 src, const int3 dst, const int num_vertices)
AcResult acDevicePeriodicBoundcondStep(const Device device, const Stream stream, const VertexBufferHandle vtxbuf_handle, const Volume start, const Volume end)
AcResult acDeviceVolumeCopy(const Device device, const Stream stream, const AcReal *in, const Volume in_offset, const Volume in_volume, AcReal *out, const Volume out_offset, const Volume out_volume)
AcResult acDeviceFFTR2C(const Device device, const Field src, const ComplexField dst)
AcResult acDeviceSwapBuffer(const Device device, const VertexBufferHandle handle)
AcResult acDevicePrintProfiles(const Device device)
static const Stream stream
Definition astaroth_device.h:187
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 acDeviceReduceAverages(const Device device, const Stream stream, const Profile prof)
AcResult acDeviceFFTBackwardTransformPlanar2R(const Device device, const Field real_src, const Field imag_src, const Field real)
AcResult acDeviceSetVertexBuffer(const Device device, const Stream stream, const VertexBufferHandle handle, const AcReal value)
AcResult acDeviceLoadScalarUniform(const Device device, const Stream stream, const AcRealParam param, const AcReal value)
AcResult acDeviceLaunchKernel(const Device device, const Stream stream, const AcKernel kernel, const Volume start, const Volume end)
AcResult acDeviceSwapBuffers(const Device device)
AcResult acDeviceResetMesh(const Device device, const Stream stream)
AcResult acDeviceGeneralBoundcondStep(const Device device, const Stream stream, const VertexBufferHandle vtxbuf_handle, const Volume start, const Volume end, const AcMeshInfo config, const int3 bindex)
AcResult acDeviceFFTR2HermitianPlanarBatched(const Device device, const Field src, const Field real_dst, const Field imag_dst, const int batch_size, Stream stream)
AcResult acDeviceDestroy(Device *device)
AcResult acDeviceLoadStencilsFromConfig(const Device device, const Stream stream)
AcResult acDeviceWriteMeshToDisk(const Device device, const VertexBufferHandle vtxbuf, const char *filepath)
AcResult acDeviceLoadInt3Uniform(const Device device, const Stream stream, const AcInt3Param param, const int3 value)
AcResult acDeviceCreate(const int id, const AcMeshInfo device_config, Device *device)
AcResult acDeviceTransferMeshWithOffset(const Device src_device, const Stream stream, const int3 src, const int3 dst, const int num_vertices, Device dst_device)
AcResult acDeviceReduceScalNoPostProcessing(const Device device, const Stream stream, const AcReduction reduction, const VertexBufferHandle vtxbuf_handle, AcReal *result)
AcResult acDeviceLoadBoolUniform(const Device device, const Stream stream, const AcBoolParam param, const bool value)
AcResult acDeviceBenchmarkKernel(const Device device, const AcKernel kernel, const int3 start, const int3 end)
AcResult acDeviceTransferVertexBuffer(const Device src_device, const Stream stream, const VertexBufferHandle vtxbuf_handle, Device dst_device)
AcResult AcMeshInfo * config
Definition astaroth_utils.h:113
#define UNUSED
Definition func_attributes.h:4
#define AC_BEGIN_C_DECLARATIONS
Definition func_define.h:14
#define AC_END_C_DECLARATIONS
Definition func_define.h:15
#define FUNC_DEFINE(return_type, func_name,...)
Definition func_define.h:69
#define cudaStream_t
Definition hip.h:25
AcResult
Definition host_datatypes.h:10
AcReduceOp
Definition host_datatypes.h:26
AcMeshOrder
Definition host_datatypes.h:17
Definition acc_runtime.h:206
Definition acc_runtime.h:110
Definition acc_runtime.h:156
Definition astaroth_base.h:41
Definition acc_runtime.h:92
static __device__ const int const int const AcRealArrayParam param
Definition user_kernel.h:129