Template Class Scalar

Class Documentation

template<typename ...Props>
class ChipSum::Numeric::Scalar

Public Types

using traits = Scalar_Traits<Props...>
using scalar_type = typename traits::scalar_type
using scalar_type_ref = typename ::std::add_lvalue_reference<scalar_type>::type
using const_scalar_type_ref = typename ::std::add_const<scalar_type_ref>::type
using host_scalar_type = typename traits::host_type
using host_scalar_type_ref = typename std::add_lvalue_reference<host_scalar_type>::type
using const_host_scalar_type_ref = typename ::std::add_const<host_scalar_type_ref>::type
using value_type = typename traits::value_type

like double or something

using value_type_ref = typename std::add_lvalue_reference<value_type>::type
using const_value_type_ref = typename ::std::add_const<value_type_ref>::type

Public Functions

inline CHIPSUM_DECLARED_FUNCTION Scalar()

Scalar 构造函数

inline CHIPSUM_DECLARED_FUNCTION Scalar(const value_type &s)

Scalar 构造函数

inline CHIPSUM_FUNCTION_INLINE const_scalar_type_ref GetData ()

GetData 获取后端底层,如Kokkos::View<double>

返回

后端数据引用

inline CHIPSUM_FUNCTION_INLINE typename ::std::add_lvalue_reference< Scalar >::type operator= (const value_type &s)
inline CHIPSUM_FUNCTION_INLINE value_type operator() ()

operator ()

返回

inline CHIPSUM_FUNCTION_INLINE operator value_type()

operator ScalarType

inline CHIPSUM_FUNCTION_INLINE void Print (std::ostream &out=std::cout)

Print.

参数

out