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

Function add_pointer_offset

include/cutlass/subbyte_reference.h:1330–1348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1328
1329template <typename Element>
1330struct ReferenceFactory<Element, false> {
1331
1332 ///! Number of elements per storage vector
1333 static int const kElementsPerVector = 1;
1334
1335 CUTLASS_HOST_DEVICE
1336 static Element &get(Element *ptr, int64_t offset) {
1337 return ptr[offset];
1338 }
1339
1340 CUTLASS_HOST_DEVICE
1341 static Element const &get(Element const *ptr, int64_t offset) {
1342 return ptr[offset];
1343 }
1344
1345 CUTLASS_HOST_DEVICE
1346 static Element *add_pointer_offset(Element *ptr, int64_t offset) {
1347 return ptr + offset;
1348 }
1349
1350 CUTLASS_HOST_DEVICE
1351 static Element const *add_pointer_offset(Element const *ptr, int64_t offset) {

Callers 2

TensorRefClass · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected