|
Stokhos Development
|
Sparse product tensor with replicated entries to provide subsets with a given coordinate. More...
#include <Stokhos_CrsProductTensor.hpp>
Static Public Member Functions | |
| template<typename OrdinalType> | |
| static CrsProductTensor | create (const Stokhos::ProductBasis< OrdinalType, ValueType > &basis, const Stokhos::Sparse3Tensor< OrdinalType, ValueType > &Cijk, const Teuchos::ParameterList ¶ms=Teuchos::ParameterList()) |
| static CrsProductTensor | createMeanBased () |
| static HostMirror | create_mirror_view (const CrsProductTensor &tensor) |
| template<class DstDevice, class DstMemory> | |
| static void | deep_copy (const CrsProductTensor< ValueType, DstDevice, DstMemory > &dst, const CrsProductTensor &src) |
Static Public Attributes | |
| static const size_type | host_vectorsize = 2 |
| static const bool | use_intrinsics = false |
| static const size_type | num_entry_align = 1 |
| static const size_type | cuda_vectorsize = 32 |
| static const bool | is_cuda |
| static const size_type | vectorsize = is_cuda ? cuda_vectorsize : host_vectorsize |
| static const size_type | tensor_align = vectorsize |
Sparse product tensor with replicated entries to provide subsets with a given coordinate.
This allows product tensor multiplication to be partitioned on a given coordinate values.
for ( size_type i = 0 ; i < p.dimension() ; ++i ) { y[i] = 0 ; for ( size_type e = p.entry_begin(i) ; e < p.entry_end(i) ; ++e ) { const size_type j = p.coord(e,0); const size_type k = p.coord(e,1); Scalar tmp = a[j] * x[k] ; if ( j != k ) tmp += a[k] * x[j] ; y[i] += p.value(e) * tmp ; } }
|
static |