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

Method operator-

less_slow.cpp:2850–2850  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2848 strided_ptr &operator-=(difference_type offset) noexcept { data_ -= offset * stride_; return *this; }
2849 strided_ptr operator+(difference_type offset) const noexcept { strided_ptr temp = *this; return temp += offset; }
2850 strided_ptr operator-(difference_type offset) const noexcept { strided_ptr temp = *this; return temp -= offset; }
2851 friend difference_type operator-(strided_ptr const &a, strided_ptr const &b) noexcept { assert(a.stride_ == b.stride_); return (a.data_ - b.data_) / static_cast<difference_type>(a.stride_); }
2852 friend bool operator==(strided_ptr const &a, strided_ptr const &b) noexcept { return a.data_ == b.data_; }
2853 friend bool operator<(strided_ptr const &a, strided_ptr const &b) noexcept { return a.data_ < b.data_; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected