Astaroth  2.2
kernels.h
Go to the documentation of this file.
1 #pragma once
2 #include "astaroth.h"
3 
4 typedef struct {
5  int3 dims;
7 } PackedData;
8 
9 typedef struct {
10  AcReal* in[NUM_VTXBUF_HANDLES];
11  AcReal* out[NUM_VTXBUF_HANDLES];
12 
13  AcReal* profiles[NUM_SCALARARRAY_HANDLES];
15 
16 struct device_s {
17  int id;
19 
20  // Concurrency
21  cudaStream_t streams[NUM_STREAMS];
22 
23  // Memory
27 };
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
34 AcResult acKernelPeriodicBoundconds(const cudaStream_t stream, const int3 start, const int3 end,
35  AcReal* vtxbuf);
36 
39 
41 AcResult acKernelAutoOptimizeIntegration(const int3 start, const int3 end, VertexBufferArray vba);
42 
44 AcResult acKernelIntegrateSubstep(const cudaStream_t stream, const int step_number,
45  const int3 start, const int3 end, VertexBufferArray vba);
46 
48 AcResult acKernelPackData(const cudaStream_t stream, const VertexBufferArray vba,
49  const int3 vba_start, PackedData packed);
50 
52 AcResult acKernelUnpackData(const cudaStream_t stream, const PackedData packed,
53  const int3 vba_start, VertexBufferArray vba);
54 
56 AcReal acKernelReduceScal(const cudaStream_t stream, const ReductionType rtype, const int3 start,
57  const int3 end, const AcReal* vtxbuf, AcReal* scratchpad,
58  AcReal* reduce_result);
59 
61 AcReal acKernelReduceVec(const cudaStream_t stream, const ReductionType rtype, const int3 start,
62  const int3 end, const AcReal* vtxbuf0, const AcReal* vtxbuf1,
63  const AcReal* vtxbuf2, AcReal* scratchpad, AcReal* reduce_result);
64 
65 #ifdef __cplusplus
66 } // extern "C"
67 #endif
acKernelAutoOptimizeIntegration
AcResult acKernelAutoOptimizeIntegration(const int3 start, const int3 end, VertexBufferArray vba)
Definition: integration.cuh:130
AcResult
AcResult
Definition: astaroth.h:51
device_s::streams
cudaStream_t streams[NUM_STREAMS]
Definition: kernels.h:21
PackedData
Definition: kernels.h:4
device_s::reduce_scratchpad
AcReal * reduce_scratchpad
Definition: kernels.h:25
device_s::reduce_result
AcReal * reduce_result
Definition: kernels.h:26
ReductionType
ReductionType
Definition: astaroth.h:53
acKernelReduceVec
AcReal acKernelReduceVec(const cudaStream_t stream, const ReductionType rtype, const int3 start, const int3 end, const AcReal *vtxbuf0, const AcReal *vtxbuf1, const AcReal *vtxbuf2, AcReal *scratchpad, AcReal *reduce_result)
Definition: reductions.cuh:201
astaroth.h
AcReal
float AcReal
Definition: astaroth.h:38
PackedData::dims
int3 dims
Definition: kernels.h:5
device_s
Definition: kernels.h:16
acKernelPeriodicBoundconds
AcResult acKernelPeriodicBoundconds(const cudaStream_t stream, const int3 start, const int3 end, AcReal *vtxbuf)
Definition: boundconds.cuh:51
acKernelReduceScal
AcReal acKernelReduceScal(const cudaStream_t stream, const ReductionType rtype, const int3 start, const int3 end, const AcReal *vtxbuf, AcReal *scratchpad, AcReal *reduce_result)
Definition: reductions.cuh:147
AcMeshInfo
Definition: astaroth.h:128
VertexBufferArray
Definition: kernels.h:9
device_s::id
int id
Definition: kernels.h:17
NUM_STREAMS
@ NUM_STREAMS
Definition: astaroth.h:81
device_s::local_config
AcMeshInfo local_config
Definition: kernels.h:18
acKernelUnpackData
AcResult acKernelUnpackData(const cudaStream_t stream, const PackedData packed, const int3 vba_start, VertexBufferArray vba)
Definition: packing.cuh:81
device_s::vba
VertexBufferArray vba
Definition: kernels.h:24
acKernelPackData
AcResult acKernelPackData(const cudaStream_t stream, const VertexBufferArray vba, const int3 vba_start, PackedData packed)
Definition: packing.cuh:66
acKernelDummy
AcResult acKernelDummy(void)
Definition: integration.cuh:254
PackedData::data
AcReal * data
Definition: kernels.h:6
acKernelIntegrateSubstep
AcResult acKernelIntegrateSubstep(const cudaStream_t stream, const int step_number, const int3 start, const int3 end, VertexBufferArray vba)
Definition: integration.cuh:211