42 #include "AbstractLinAlgPack_SpVectorView.hpp"
48 template<
int N,
class T>
49 class assert_compile_time {
65 class assert_compile_time<0,double> {
74 % (int)
sizeof(AbstractLinAlgPack::value_type))
77 validate_value_stride;
82 % (int)
sizeof(AbstractLinAlgPack::index_type))
85 validate_index_stride;
89 / (int)
sizeof(AbstractLinAlgPack::value_type);
93 / (int)
sizeof(AbstractLinAlgPack::index_type);
97 RTOpPack::SparseSubVector
98 AbstractLinAlgPack::sub_vec_view(
99 const SpVectorSlice& sv_in
100 ,
const Range1D& rng_in
104 const Range1D rng = RangePack::full_range(rng_in,1,sv_in.dim());
105 const SpVectorSlice sv = sv_in(rng);
107 RTOpPack::SparseSubVector sub_vec;
123 SpVectorSlice::const_iterator itr = sv.begin();
125 if( sv.dim() && sv.nz() == sv.dim() && sv.is_sorted() ) {
127 Teuchos::arcp(&itr->value(), 0, values_stride*rng.size(),
false) ;
137 Teuchos::arcp(&itr->value(), 0, values_stride*sv.nz(),
false) ;
139 Teuchos::arcp(&itr->index(), 0, indices_stride*sv.nz(),
false);
Sparse storage element type.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)