7 template <
class T,
class ITYPE>
13 indices = rhs.indices;
14 bitmap =
new bool[length];
15 values =
new T[length];
17 for(ITYPE i=0; i< length; ++i)
18 bitmap[i]= rhs.bitmap[i];
19 for(ITYPE i=0; i< length; ++i)
20 values[i]= rhs.values[i];
24 template <
class T,
class ITYPE>
38 indices = rhs.indices;
39 bitmap =
new bool[length];
40 values =
new T[length];
42 for(ITYPE i=0; i< length; ++i)
43 bitmap[i]= rhs.bitmap[i];
44 for(ITYPE i=0; i< length; ++i)
45 values[i]= rhs.values[i];
51 template <
class T,
class ITYPE>
61 template <
class T,
class ITYPE>
70 indices.push_back(pos);
74 template <
class T,
class ITYPE>
77 ITYPE nnz = indices.size();
78 for(ITYPE =0; i<nnz; ++i)
80 y[indices[i]] += values[indices[i]];
81 values[indices[i]] = 0;
82 bitmap[indices[i]] =
false;
Scatter(T value, ITYPE pos)
Spa< T, ITYPE > & operator=(const Spa< T, ITYPE > &rhs)