9 #ifndef BC_EXPRESSION_TEMPLATES_ARRAY_SCALAR_CONSTANT_H_    10 #define BC_EXPRESSION_TEMPLATES_ARRAY_SCALAR_CONSTANT_H_    18 template<
class Derived>
    32 template<
class Scalar, 
class SystemTag>
    48     auto operator() (
const integers&...)
 const {
    62 template<
class SystemTag, 
class value_type>
    67 template<
int Value, 
class Scalar, 
class SystemTag>
    70 template<
int Value, 
class Scalar>
    81     auto operator() (
const integers&...)
 const {
    86     auto operator() (
const integers&...) {
    97 template<
int Value, 
class Scalar>
   105     const Scalar* value = cuda_constexpr_scalar_ptr();
   107     template<
class... integers> 
BCINLINE   108     auto operator()  (
const integers&...)
 const {
   112     template<
class... integers> 
BCINLINE   113     auto operator() (
const integers&...) {
   123     static const Scalar* cuda_constexpr_scalar_ptr() {
   125         static Scalar* scalar_constant = [](){
   130                     cudaMemcpy(scalar, &value, 
sizeof(
Scalar),
   131                             cudaMemcpyHostToDevice));
   135         return scalar_constant;
   140 template<
class SystemTag, 
int Value, 
class Scalar>
 #define BCINLINE
Definition: common.h:96
 
std::false_type move_assignable
Definition: array_scalar_constant.h:29
 
Definition: array_scalar_constant.h:68
 
std::true_type stack_allocated
Definition: array_scalar_constant.h:39
 
BCHOT const Scalar * data() const
Definition: array_scalar_constant.h:120
 
auto make_scalar_constant(value_type scalar)
Definition: array_scalar_constant.h:63
 
size_t value_type
Definition: shape.h:120
 
BCINLINE Scalar_Constant(value_type scalar_)
Definition: array_scalar_constant.h:44
 
Definition: array_scalar_constant.h:33
 
std::false_type copy_assignable
Definition: array_scalar_constant.h:28
 
Definition: array_scalar_constant.h:19
 
#define BC_CUDA_ASSERT(...)
Definition: common.h:194
 
static constexpr int tensor_iterator_dim
Definition: array_scalar_constant.h:23
 
std::false_type copy_constructible
Definition: array_scalar_constant.h:26
 
Tensor< 0, ValueType, Allocator > Scalar
Definition: tensors.h:44
 
value_type scalar
Definition: array_scalar_constant.h:42
 
#define BCHOT
Definition: common.h:97
 
BCINLINE size_t operator[](size_t i)
Definition: shape.h:133
 
static constexpr int tensor_dim
Definition: array_scalar_constant.h:24
 
std::false_type move_constructible
Definition: array_scalar_constant.h:27
 
SystemTag system_tag
Definition: array_scalar_constant.h:37
 
Definition: expression_template_base.h:107
 
BCHOT const Scalar * data() const
Definition: array_scalar_constant.h:93
 
The Evaluator determines if an expression needs to be greedily optimized. 
Definition: algorithms.h:22
 
BCINLINE const value_type * data() const
Definition: array_scalar_constant.h:56
 
auto make_constexpr_scalar()
Definition: array_scalar_constant.h:141