16#ifndef dealii_cuda_kernels_h
17#define dealii_cuda_kernels_h
21#ifdef DEAL_II_WITH_CUDA
42 using ::CUDAWrappers::block_size;
43 using ::CUDAWrappers::chunk_size;
44 using ::CUDAWrappers::warp_size;
52 template <
typename Number>
63 template <
typename Number>
66 __device__
static inline Number
73 template <
typename Number>
76 __device__
static inline std::complex<Number>
77 operation(
const std::complex<Number> a,
const std::complex<Number>)
79 printf(
"This function is not implemented for std::complex<Number>!");
92 template <
typename Number>
95 __device__
static inline Number
102 template <
typename Number>
105 __device__
static inline std::complex<Number>
107 const std::complex<Number> )
109 printf(
"This function is not implemented for std::complex<Number>!");
122 template <
typename Number>
125 __device__
static inline Number
128 return a > b ? a : b;
132 template <
typename Number>
135 __device__
static inline std::complex<Number>
136 operation(
const std::complex<Number> a,
const std::complex<Number>)
138 printf(
"This function is not implemented for std::complex<Number>!");
151 template <
typename Number>
154 __device__
static inline Number
157 return a > b ? b : a;
161 template <
typename Number>
164 __device__
static inline std::complex<Number>
165 operation(
const std::complex<Number> a,
const std::complex<Number>)
167 printf(
"This function is not implemented for std::complex<Number>!");
180 template <
typename Number,
template <
typename>
class Binop>
194 template <
typename Number,
template <
typename>
class Binop>
209 template <
typename Number>
212 __device__
static Number
215 __device__
static Number
218 __device__
static Number
221 __device__
static Number
233 template <
typename Number>
236 __device__
static Number
239 __device__
static Number
242 __device__
static Number
245 __device__
static Number
257 template <
typename Number>
260 __device__
static Number
263 __device__
static Number
266 __device__
static Number
269 __device__
static Number
280 template <
typename Number,
typename Operation>
292 template <
typename Number>
295 __device__
static Number
298 __device__
static Number
301 __device__
static Number
304 __device__
static Number
316 template <
typename Number,
typename Operation>
330 template <
typename Number>
341 template <
typename Number>
345 const Number * V_val,
356 template <
typename Number>
360 const Number * V_val,
362 const Number * W_val,
373 template <
typename Number>
378 const Number * V_val,
389 template <
typename Number>
394 const Number * V_val,
396 const Number * W_val,
407 template <
typename Number>
418 template <
typename Number>
420 equ(Number *val,
const Number a,
const Number *V_val,
const size_type N);
429 template <
typename Number>
433 const Number * V_val,
435 const Number * W_val,
446 template <
typename Number>
462 template <
typename Number>
473 template <
typename Number,
typename IndexType>
488 template <
typename Number,
typename IndexType>
491 const IndexType *indices,
503 template <
typename Number>
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
__global__ void add_aVbW(Number *val, const Number a, const Number *V_val, const Number b, const Number *W_val, const size_type N)
__global__ void set_permutated(const IndexType *indices, Number *val, const Number *v, const IndexType N)
__global__ void add_aV(Number *val, const Number a, const Number *V_val, const size_type N)
__global__ void equ(Number *val, const Number a, const Number *V_val, const size_type N)
__global__ void gather(Number *val, const IndexType *indices, const Number *v, const IndexType N)
__global__ void masked_vector_bin_op(const unsigned int *mask, Number *v1, const Number *v2, const size_type N)
__global__ void vec_add(Number *val, const Number a, const size_type N)
__global__ void double_vector_reduction(Number *result, const Number *v1, const Number *v2, const size_type N)
__global__ void vec_scale(Number *val, const Number a, const size_type N)
__global__ void reduction(Number *result, const Number *v, const size_type N)
__global__ void add_and_dot(Number *res, Number *v1, const Number *v2, const Number *v3, const Number a, const size_type N)
__global__ void set(Number *val, const Number s, const size_type N)
__global__ void vector_bin_op(Number *v1, const Number *v2, const size_type N)
__global__ void scale(Number *val, const Number *V_val, const size_type N)
__global__ void sadd(const Number s, Number *val, const Number a, const Number *V_val, const size_type N)
__global__ void add_permutated(const size_type *indices, Number *val, const Number *v, const size_type N)
unsigned int global_dof_index
static std::complex< Number > operation(const std::complex< Number > a, const std::complex< Number >)
static Number operation(const Number a, const Number b)
static std::complex< Number > operation(const std::complex< Number > a, const std::complex< Number >)
static Number operation(const Number a, const Number b)
static std::complex< Number > operation(const std::complex< Number > a, const std::complex< Number >)
static Number operation(const Number a, const Number b)
static std::complex< Number > operation(const std::complex< Number > a, const std::complex< Number >)
static Number operation(const Number a, const Number b)
static Number null_value()
static Number reduction_op(const Number a, const Number b)
static Number atomic_op(Number *dst, const Number a)
static Number binary_op(const Number a, const Number b)
static Number element_wise_op(const Number a)
static Number atomic_op(Number *dst, const Number a)
static Number reduction_op(const Number a, const Number b)
static Number null_value()
static Number null_value()
static Number atomic_op(Number *dst, const Number a)
static Number reduction_op(const Number a, const Number b)
static Number element_wise_op(const Number a)
static Number null_value()
static Number reduction_op(const Number a, const Number b)
static Number atomic_op(Number *dst, const Number a)
static Number element_wise_op(const Number a)