MCPcopy Create free account
hub / github.com/NVIDIA/cutlass / const_ref

Method const_ref

include/cutlass/tensor_ref.h:229–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227 /// Converting constructor from TensorRef to non-constant data.
228 template<typename _Magic = int>
229 CUTLASS_HOST_DEVICE
230 TensorRef(
231 NonConstTensorRef const &ref, ///< TensorRef to non-const data
232 ///SFINAE trick to avoid creating a copy-constructor when Element_ is already non-const
233 _Magic magic = (typename platform::enable_if< ! platform::is_same<NonConstTensorRef, TensorRef<Element_, Layout_> >::value, _Magic>::type)0
234 ):
235 ptr_(ref.data()), layout_(ref.layout()) { }
236
237 /// Returns a reference to constant-valued tensor.
238 CUTLASS_HOST_DEVICE
239 ConstTensorRef const_ref() const {
240 return ConstTensorRef(ptr_, layout_);
241 }
242
243 CUTLASS_HOST_DEVICE
244 NonConstTensorRef non_const_ref() const {

Callers

nothing calls this directly

Calls 2

dataMethod · 0.45
layoutMethod · 0.45

Tested by

no test coverage detected