56 return DstElement(src);
90 F
const &convert_): dst(dst_), src(src_), convert(convert_) {}
95 dst.
at(coord) = convert(src.
at(coord));
115 F
const &transform) {
124 CopyIf copy_if(dst, src, transform);
144 F
const &transform) {
155 CopyIf copy_if(dst, src_view, transform);
172 F
const &transform) {
183 CopyIf copy_if(dst_view, src, transform);
Definition: aligned_buffer.h:35
CUTLASS_HOST_DEVICE TensorCoord const & extent() const
Returns the extent of the view (the size along each logical dimension).
Definition: tensor_view.h:167
void TensorCopy(TensorView< DstElement, DstLayout > dst, TensorView< SrcElement, SrcLayout > src, F const &transform)
Copies elements from one tensor view into another, satisfying bounds of each tensor.
Definition: tensor_copy.h:112
TensorCopyIf()
Definition: tensor_copy.h:85
DstElement operator()(SrcElement src) const
Definition: tensor_copy.h:55
void operator()(Coord< DstLayout::kRank > const &coord)
Copies based on destination and source bounds.
Definition: tensor_copy.h:93
Helper to convert between types.
Definition: tensor_copy.h:51
TensorCopyIf(DstTensorView const &dst_, SrcTensorView const &src_, F const &convert_)
Definition: tensor_copy.h:87
Helper to conditionally copy between tensor views.
Definition: tensor_copy.h:68
Statically-sized array specifying Coords within a tensor.
Definition: coord.h:43
F convert
Definition: tensor_copy.h:79
CUTLASS_HOST_DEVICE Reference at(TensorCoord const &coord) const
Returns a reference to the element at a given Coord.
Definition: tensor_ref.h:307
void TensorForEach(Coord< Rank > extent, Func &func)
Iterates over the index space of a tensor.
Definition: host/tensor_foreach.h:87
CUTLASS_HOST_DEVICE bool contains(TensorCoord const &coord) const
Determines whether a location is within a tensor.
Definition: tensor_view.h:175
TrivialConvert()
Definition: tensor_copy.h:53
SrcTensorView src
Definition: tensor_copy.h:78
DstTensorView dst
Definition: tensor_copy.h:77
Basic include for CUTLASS.