Astaroth  3.1
Scalable Multi-GPU Stencil Computations
Loading...
Searching...
No Matches
user_kernel.h File Reference
#include "host_datatypes.h"
#include "user_defines.h"
#include "acc_runtime.h"
#include "acc/implementation.h"
#include "astaroth_cuda_wrappers.h"
#include "device_details.h"
#include "errchk.h"
#include "kernels.h"
#include "math_utils.h"
#include "random.cuh"
#include "static_analysis.h"
#include "dconst_decl.h"
#include "get_address.h"
#include "reduce_helpers_decls.h"
#include "output_value_decl.h"
#include "user_defines_runtime_lib.h"
#include "extern_arrays_decl.h"
#include "device_fields_info.h"
#include "device_output_info.h"
Include dependency graph for user_kernel.h:

Go to the source code of this file.

Macros

#define ac_dummy_write(field, x, y, z)
#define ac_dynamic_stencils_begin()
#define ac_dynamic_stencils_end()
#define d_multigpu_offset   (d_mesh_info.int3_params[AC_multigpu_offset])
#define DEVICE_VARIABLE_VTXBUF_IDX(i, j, k, dims)
#define DEVICE_VTXBUF_IDX(i, j, k)
#define error_message(error, message)
#define fatal_error_message(error, message)
#define LOCAL_COMPDOMAIN_IDX(coord)
#define longlong   long long
#define postprocess_reduce_result(DST, OP)
#define print(...)
#define PROFILE_X_Y_OR_Z_INDEX(i, j)
#define PROFILE_Y_X_OR_Z_INDEX(i, j)
#define PROFILE_Z_X_OR_Y_INDEX(i, j)
#define size(arr)
#define suppress_unused_warning(X)

Typedefs

typedef void(* Kernel) (const int3, const int3, DeviceVertexBufferArray vba)

Variables

__device__ __constant__ AcMeshInfoScalars d_mesh_info
static __device__ const int dims
static __device__ const int const int index
static __device__ const int const int const AcRealArrayParam param
__device__ AcReal stencils [NUM_STENCILS][STENCIL_DEPTH][STENCIL_HEIGHT][STENCIL_WIDTH]

Macro Definition Documentation

◆ ac_dummy_write

#define ac_dummy_write ( field,
x,
y,
z )

◆ ac_dynamic_stencils_begin

#define ac_dynamic_stencils_begin ( )

◆ ac_dynamic_stencils_end

#define ac_dynamic_stencils_end ( )

◆ d_multigpu_offset

#define d_multigpu_offset   (d_mesh_info.int3_params[AC_multigpu_offset])

◆ DEVICE_VARIABLE_VTXBUF_IDX

#define DEVICE_VARIABLE_VTXBUF_IDX ( i,
j,
k,
dims )
Value:
((i) + dims.x * ((j) + (k) * dims.y))
static __device__ const int dims
Definition user_kernel.h:128

◆ DEVICE_VTXBUF_IDX

#define DEVICE_VTXBUF_IDX ( i,
j,
k )
Value:
((i) + (j) * VAL(AC_mlocal).x + (k) * VAL(AC_mlocal_products).xy)

◆ error_message

#define error_message ( error,
message )

◆ fatal_error_message

#define fatal_error_message ( error,
message )

◆ LOCAL_COMPDOMAIN_IDX

#define LOCAL_COMPDOMAIN_IDX ( coord)
Value:
((coord.x) + (coord.y) * VAL(AC_nlocal).x + \
(coord.z) * VAL(AC_nlocal_products).xy)

◆ longlong

#define longlong   long long

◆ postprocess_reduce_result

#define postprocess_reduce_result ( DST,
OP )

◆ print

#define print ( ...)
Value:
{ \
if (!DCONST(AC_autotuning_at_work)) \
printf(__VA_ARGS__); \
}

◆ PROFILE_X_Y_OR_Z_INDEX

#define PROFILE_X_Y_OR_Z_INDEX ( i,
j )
Value:
((i) + (j) * VAL(AC_mlocal).x)

◆ PROFILE_Y_X_OR_Z_INDEX

#define PROFILE_Y_X_OR_Z_INDEX ( i,
j )
Value:
((i) + (j) * VAL(AC_mlocal).y)

◆ PROFILE_Z_X_OR_Y_INDEX

#define PROFILE_Z_X_OR_Y_INDEX ( i,
j )
Value:
((i) + (j) * VAL(AC_mlocal).z)

◆ size

#define size ( arr)
Value:
(int)(sizeof(arr) / sizeof(arr[0]))

◆ suppress_unused_warning

#define suppress_unused_warning ( X)
Value:
(void)X

Typedef Documentation

◆ Kernel

typedef void(* Kernel) (const int3, const int3, DeviceVertexBufferArray vba)

Variable Documentation

◆ d_mesh_info

__device__ __constant__ AcMeshInfoScalars d_mesh_info
extern

◆ dims

__device__ const int dims

◆ index

__device__ const int const int index

◆ param

__device__ const int const int const AcRealArrayParam param
Initial value:
{
return safe_access(arr, dims, index,real_array_names__device__[param])
static __device__ const int const int index
Definition user_kernel.h:128
static __device__ const int const int const AcRealArrayParam param
Definition user_kernel.h:129

◆ stencils

__device__ AcReal stencils[NUM_STENCILS][STENCIL_DEPTH][STENCIL_HEIGHT][STENCIL_WIDTH]
extern