26 #ifndef TILEDARRAY_TENSOR_SHIFT_WRAPPER_H__INCLUDED 27 #define TILEDARRAY_TENSOR_SHIFT_WRAPPER_H__INCLUDED 50 typedef typename tensor_type::pointer
pointer;
78 typedef typename std::decay<U>::type arg_type;
80 typename arg_type::const_reference MADNESS_RESTRICT r) { l = r; },
88 T&
get()
const {
return *tensor_; }
98 decltype(
auto)
range()
const {
return tensor_->range(); }
103 decltype(
auto)
data()
const {
return tensor_->data(); }
108 decltype(
auto)
empty()
const {
return tensor_->empty(); }
121 template <
typename Left,
typename Right>
123 return (left.range().rank() == right.
range().rank()) &&
124 std::equal(left.range().extent_data(),
125 left.range().extent_data() + left.range().rank(), right.
range().extent_data());
135 template <
typename T>
146 template <
typename T>
153 #endif // TILEDARRAY_TENSOR_SHIFT_WRAPPER_H__INCLUDED detail::ShiftWrapper< T > shift(T &tensor)
Shift a tensor from one range to another.
void inplace_tensor_op(Op &&op, TR &result, const Ts &... tensors)
In-place tensor operations with contiguous data.
decltype(auto) range() const
Tensor type conversion operator.
tensor_type::range_type range_type
bool is_range_congruent(const Left &left, const ShiftWrapper< Right > &right)
Check for congruent range objects with a shifted tensor.
std::remove_const< T >::type tensor_type
ShiftWrapper & operator=(const ShiftWrapper &)=delete
ShiftWrapper< T > ShiftWrapper_
tensor_type::const_reference const_reference
tensor_type::value_type value_type
tensor_type::const_pointer const_pointer
tensor_type::reference reference
decltype(auto) data() const
Tensor data pointer accessor.
tensor_type::size_type size_type
ShiftWrapper< T > & operator=(U &&other)
Assignment operator.
decltype(auto) empty() const
Check for an empty tensor.
tensor_type::pointer pointer