MCPcopy Create free account
hub / github.com/ashvardanian/less_slow.cpp / strided_ptr

Method strided_ptr

less_slow.cpp:2826–2828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2824 using iterator_category = std::random_access_iterator_tag;
2825
2826 strided_ptr(std::byte *data, std::size_t stride_bytes) : data_(data), stride_(stride_bytes) {
2827 assert(data_ && "Pointer must not be null, as NULL arithmetic is undefined");
2828 }
2829#if defined(__cpp_lib_assume_aligned) // Not available in Apple Clang
2830 reference operator*() const noexcept {
2831 return *std::launder(std::assume_aligned<1>(reinterpret_cast<pointer>(data_)));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected