Documentation
template<typename T>
class TiledArray::detail::SizeArray< T >
Array wrapper.
This object is a wrapper for raw memory buffers so that it has the same interface, and can be used in place of, standard containers (e.g. std::vector). SizeArray does not own the buffer, therefore it is the user's responsibility to manage (allocate, free, etc.) the memory buffer.
- Template Parameters
-
T The type of the array referenced by this array object
Definition at line 40 of file size_array.h.
Public Types | |
typedef T | value_type |
typedef T * | iterator |
typedef const T * | const_iterator |
typedef T & | reference |
typedef const T & | const_reference |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef std::size_t | size_type |
typedef std::ptrdiff_t | difference_type |
typedef std::reverse_iterator< iterator > | reverse_iterator |
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
Public Member Functions | |
SizeArray ()=default | |
SizeArray (const SizeArray &)=default | |
SizeArray (SizeArray< T > &&)=default | |
~SizeArray ()=default | |
SizeArray (pointer const first, pointer const last) | |
SizeArray (pointer const first, const size_type n) | |
void | set (pointer const first, const size_type n) |
void | set (pointer const first, pointer const last) |
SizeArray< T > & | operator= (const SizeArray< T > &other) |
template<typename U > | |
SizeArray< T > & | operator= (const U &other) |
template<typename U > | |
operator std::vector< U > () const | |
template<typename U , std::size_t N> | |
operator std::array< U, N > () const | |
template<typename U , std::size_t Size> | |
operator boost::container::small_vector< U, Size > () const | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
reverse_iterator | rbegin () |
const_reverse_iterator | rbegin () const |
reverse_iterator | rend () |
const_reverse_iterator | rend () const |
reference | operator[] (size_type i) |
const_reference | operator[] (size_type i) const |
reference | at (size_type i) |
const_reference | at (size_type i) const |
reference | front () |
const_reference | front () const |
reference | back () |
const_reference | back () const |
size_type | size () const |
bool | empty () const |
size_type | max_size () const |
void | swap (SizeArray< T > &other) |
const_pointer | data () const |
pointer | data () |
void | assign (const_reference value) |
template<typename U > | |
bool | operator== (const SizeArray< U > &other) const |
template<typename U > | |
bool | operator!= (const SizeArray< U > &other) const |
template<typename Arg , typename Op > | |
void | binary (const Arg *const arg, const Op &op) |
Binary vector operation. More... | |
template<typename Left , typename Right , typename Op > | |
void | binary (const Left *const left, const Right *const right, const Op &op) |
Binary vector operation. More... | |
template<typename Op > | |
void | unary (const Op &op) |
Unary vector operation. More... | |
template<typename Arg , typename Op > | |
void | unary (const Arg *const arg, const Op &op) |
Unary vector operation. More... | |
template<typename Arg , typename Result , typename ReduceOp , typename JoinOp > | |
Result | reduce (const Arg *const arg, Result result, const ReduceOp &reduce_op, const JoinOp &join_op) const |
Binary reduction operation. More... | |
template<typename Result , typename ReduceOp , typename JoinOp > | |
Result | reduce (Result result, const ReduceOp &reduce_op, const JoinOp &join_op) const |
Unary reduction operation. More... | |
template<typename Left , typename Right , typename Op > | |
void | row_reduce (const size_type n, const Left *const left, const Right *right, const Op &op) |
Row reduce operation. More... | |
template<typename Arg , typename Op > | |
void | row_reduce (const size_type n, const Arg *const arg, const Op &op) |
Row reduce operation. More... | |
template<typename Left , typename Right , typename Op > | |
void | col_reduce (const size_type m, const Left *const left, const Right *right, const Op &op) |
Column reduce operation. More... | |
template<typename Arg , typename Op > | |
void | col_reduce (const size_type m, const Arg *const arg, const Op &op) |
Columns reduce operation. More... | |
template<typename Left , typename Right , typename Op > | |
void | outer (const size_type m, const size_type n, const Left *const left, const Right *const right, const Op &op) |
Outer operation. More... | |
template<typename Left , typename Right , typename Op > | |
void | outer_fill (const size_type m, const size_type n, const Left *const left, const Right *const right, const Op &op) |
Outer fill operation. More... | |
template<typename Left , typename Right , typename Base , typename Op > | |
void | outer_fill (const size_type m, const size_type n, const Left *const left, const Right *const right, const Base *const base, const Op &op) |
Outer operation. More... | |
Member Typedef Documentation
◆ const_iterator
typedef const T* TiledArray::detail::SizeArray< T >::const_iterator |
Definition at line 49 of file size_array.h.
◆ const_pointer
typedef const T* TiledArray::detail::SizeArray< T >::const_pointer |
Definition at line 53 of file size_array.h.
◆ const_reference
typedef const T& TiledArray::detail::SizeArray< T >::const_reference |
Definition at line 51 of file size_array.h.
◆ const_reverse_iterator
typedef std::reverse_iterator<const_iterator> TiledArray::detail::SizeArray< T >::const_reverse_iterator |
Definition at line 119 of file size_array.h.
◆ difference_type
typedef std::ptrdiff_t TiledArray::detail::SizeArray< T >::difference_type |
Definition at line 55 of file size_array.h.
◆ iterator
typedef T* TiledArray::detail::SizeArray< T >::iterator |
Definition at line 48 of file size_array.h.
◆ pointer
typedef T* TiledArray::detail::SizeArray< T >::pointer |
Definition at line 52 of file size_array.h.
◆ reference
typedef T& TiledArray::detail::SizeArray< T >::reference |
Definition at line 50 of file size_array.h.
◆ reverse_iterator
typedef std::reverse_iterator<iterator> TiledArray::detail::SizeArray< T >::reverse_iterator |
Definition at line 118 of file size_array.h.
◆ size_type
typedef std::size_t TiledArray::detail::SizeArray< T >::size_type |
Definition at line 54 of file size_array.h.
◆ value_type
typedef T TiledArray::detail::SizeArray< T >::value_type |
Definition at line 47 of file size_array.h.
Constructor & Destructor Documentation
◆ SizeArray() [1/5]
|
default |
◆ SizeArray() [2/5]
|
default |
◆ SizeArray() [3/5]
|
default |
◆ ~SizeArray()
|
default |
◆ SizeArray() [4/5]
|
inline |
Definition at line 63 of file size_array.h.
◆ SizeArray() [5/5]
|
inline |
Definition at line 66 of file size_array.h.
Member Function Documentation
◆ assign()
|
inline |
◆ at() [1/2]
|
inline |
◆ at() [2/2]
|
inline |
◆ back() [1/2]
|
inline |
Definition at line 156 of file size_array.h.
◆ back() [2/2]
|
inline |
Definition at line 161 of file size_array.h.
◆ begin() [1/2]
|
inline |
◆ begin() [2/2]
|
inline |
Definition at line 113 of file size_array.h.
◆ binary() [1/2]
|
inline |
Binary vector operation.
Binary operation where this object is the left-hand argument. The values of this array is set by op(*this[i], arg[i])
.
- Template Parameters
-
Arg The right-hand argument type Op The binary operation type
- Parameters
-
arg The right-hand argument op The binary operation
Definition at line 225 of file size_array.h.
◆ binary() [2/2]
|
inline |
Binary vector operation.
Binary operation sets the values of this array such that, *this[i] = op(left[i], right[i])
. The result type of op
must be value_type
or implicitly convertible to value_type
.
- Template Parameters
-
Left The left-hand argument type Right The right-hand argument type Op The binary operation type
- Parameters
-
left The left-hand argument right The right-hand argument op The binary operation
Definition at line 241 of file size_array.h.
◆ col_reduce() [1/2]
|
inline |
Columns reduce operation.
Reduce columns of arg
matrix to this array. The reduced result is computed by op(*this[j], arg[i][j])
.
- Template Parameters
-
Arg The matrix element type Op The reduction operation
- Parameters
-
m The number of rows in the matrix arg The matrix pointer of size m*size
()op The reduction operation
Definition at line 365 of file size_array.h.
◆ col_reduce() [2/2]
|
inline |
Column reduce operation.
Reduce columns of left
matrix to this array. The reduced result is computed by op(*this[j], left[i][j], right[i])
.
- Template Parameters
-
Left The matrix element type Right The vector element type Op The reduction operation
- Parameters
-
m The number of rows in the matrix left The matrix pointer of size m*size
()right The vector pointer of size m
op The reduction operation
Definition at line 350 of file size_array.h.
◆ data() [1/2]
|
inline |
Definition at line 180 of file size_array.h.
◆ data() [2/2]
|
inline |
◆ empty()
|
inline |
Definition at line 168 of file size_array.h.
◆ end() [1/2]
|
inline |
◆ end() [2/2]
|
inline |
Definition at line 115 of file size_array.h.
◆ front() [1/2]
|
inline |
Definition at line 146 of file size_array.h.
◆ front() [2/2]
|
inline |
Definition at line 151 of file size_array.h.
◆ max_size()
|
inline |
Definition at line 169 of file size_array.h.
◆ operator boost::container::small_vector< U, Size >()
|
inline |
Definition at line 107 of file size_array.h.
◆ operator std::array< U, N >()
|
inline |
◆ operator std::vector< U >()
|
inline |
Definition at line 93 of file size_array.h.
◆ operator!=()
|
inline |
Definition at line 202 of file size_array.h.
◆ operator=() [1/2]
|
inline |
◆ operator=() [2/2]
|
inline |
◆ operator==()
|
inline |
Definition at line 189 of file size_array.h.
◆ operator[]() [1/2]
|
inline |
Definition at line 131 of file size_array.h.
◆ operator[]() [2/2]
|
inline |
Definition at line 132 of file size_array.h.
◆ outer()
|
inline |
Outer operation.
This function use two vectors, left
and right
, and this vector to modify this vector ( which is treated as a matrix of size m*n
) such that op(*this[i][j], left[i], right[j])
.
- Template Parameters
-
Left The left-hand argument type Right The right-hand argument type
- Parameters
-
m The size of the left-hand array n The size of the right-hand array left A pointer to the left-hand array right A pointer to the right-hand array op The outer operation
Definition at line 382 of file size_array.h.
◆ outer_fill() [1/2]
|
inline |
Outer operation.
This function use two vectors, left
and right
, and base array to modify this array ( which are treated as a matrix of size m*n
) such that *this[i][j] = op(base[i][j], left[i], right[j])
.
- Template Parameters
-
Left The left-hand argument type Right The right-hand argument type Base The base argument type
- Parameters
-
m The size of the left-hand array n The size of the right-hand array left A pointer to the left-hand array right A pointer to the right-hand array base A pointer to the base array op The outer operation
Definition at line 422 of file size_array.h.
◆ outer_fill() [2/2]
|
inline |
Outer fill operation.
This function use two vectors, left
and right
, to fill this vector ( which is treated as a matrix of size m*n
) such that *this[i][j] = op(left[i], right[j])
.
- Template Parameters
-
Left The left-hand array type Right The right-hand array type
- Parameters
-
m The size of the left-hand array n The size of the right-hand array left A pointer to the left-hand array right A pointer to the right-hand array op The outer operation
Definition at line 401 of file size_array.h.
◆ rbegin() [1/2]
|
inline |
◆ rbegin() [2/2]
|
inline |
◆ reduce() [1/2]
|
inline |
Binary reduction operation.
Perform an element-wise binary reduction of the data of this
and arg
by executing join_op(result, reduce_op(*this[i], arg[i]))
for each i
in the index range of this
. result
is initialized to identity
. If HAVE_INTEL_TBB is defined the reduction will be executed in an undefined order, otherwise will execute in the order of increasing i
.
- Template Parameters
-
Arg The right-hand argument type Result The reduction result type ReduceOp The binary reduction operation type JoinOp The join operation type
- Parameters
-
arg The right-hand argument result The initial value of the reduction op The binary reduction operation
- Returns
- The reduced value
Definition at line 283 of file size_array.h.
◆ reduce() [2/2]
|
inline |
Unary reduction operation.
Perform an element-wise unary reduction of the data by executing join_op(result, reduce_op(*this[i]))
for each i
in the index range of this
. result
is initialized to identity
. If HAVE_INTEL_TBB is defined the reduction will be executed in an undefined order, otherwise will execute in the order of increasing i
.
- Template Parameters
-
Result The reduction result type ReduceOp The binary reduction operation type JoinOp The join operation type
- Parameters
-
result The initial value of the reduction op The unary reduction operation
- Returns
- The reduced value
Definition at line 301 of file size_array.h.
◆ rend() [1/2]
|
inline |
◆ rend() [2/2]
|
inline |
◆ row_reduce() [1/2]
|
inline |
Row reduce operation.
Reduce rows of arg
matrix to this array. The reduced result is computed by op(*this[i], arg[i][j])
.
- Template Parameters
-
Arg The matrix element type Op The reduction operation
- Parameters
-
n The number of columns in the matrix arg The matrix pointer of size size()*n
op The reduction operation
Definition at line 334 of file size_array.h.
◆ row_reduce() [2/2]
|
inline |
Row reduce operation.
Reduce rows of left
matrix to this array. The reduced result is computed by op(*this[i], left[i][j], right[j])
.
- Template Parameters
-
Left The matrix element type Right The vector element type Op The reduction operation
- Parameters
-
n The number of columns in the matrix left The matrix pointer of size size()*n
right The vector pointer of size n
op The reduction operation
Definition at line 319 of file size_array.h.
◆ set() [1/2]
|
inline |
◆ set() [2/2]
|
inline |
Definition at line 74 of file size_array.h.
◆ size()
|
inline |
◆ swap()
|
inline |
◆ unary() [1/2]
|
inline |
Unary vector operation.
Unary operation sets the values of this array such that, *this[i] = op(arg[i])
. The result type of op
must be value_type
or implicitly convertible to value_type
.
- Template Parameters
-
Arg The argument type Op The unary operation type
- Parameters
-
arg The argument op The unary, element operation
Definition at line 266 of file size_array.h.
◆ unary() [2/2]
|
inline |
Unary vector operation.
Unary operation where this object is the argument. The values of this array is set by op(*this[i])
.
- Template Parameters
-
Op The binary operation type
- Parameters
-
op The binary operation
Definition at line 252 of file size_array.h.
The documentation for this class was generated from the following file:
- TiledArray/size_array.h