peclet-morton 1.0.2
Fast Morton (Z-order) codes with O(1) arithmetic
Loading...
Searching...
No Matches
morton::kokkos Namespace Reference

Namespaces

namespace  detail

Functions

template<unsigned Bits, class ViewX, class ViewY, class ViewOut>
void encode2 (const ViewX &x, const ViewY &y, const ViewOut &out)
 Encode coordinate Views (2D) into a code View. x,y,out extents must match.
template<unsigned Bits, class ViewX, class ViewY, class ViewZ, class ViewOut>
void encode3 (const ViewX &x, const ViewY &y, const ViewZ &z, const ViewOut &out)
 Encode coordinate Views (3D) into a code View.
template<unsigned Bits, class ViewCode, class ViewX, class ViewY>
void decode2 (const ViewCode &code, const ViewX &x, const ViewY &y)
 Decode a code View back to coordinate Views (2D).
template<unsigned Bits, class ViewCode, class ViewX, class ViewY, class ViewZ>
void decode3 (const ViewCode &code, const ViewX &x, const ViewY &y, const ViewZ &z)
 Decode a code View back to coordinate Views (3D).
template<unsigned Dim, unsigned Bits, class ViewIn, class ViewOut>
void add (const ViewIn &in, const ViewOut &out, unsigned axis, long long delta)
 Add a signed delta to axis of every code (wraps mod 2^Bits).
template<unsigned Dim, unsigned Bits, class ViewIn, class ViewOut>
void sub (const ViewIn &in, const ViewOut &out, unsigned axis, typename Morton< Dim, Bits >::coord_type k)
 Subtract k from axis of every code (wraps). Convenience over add.
template<unsigned Dim, unsigned Bits, class ViewIn, class ViewOut>
void step (const ViewIn &in, const ViewOut &out, unsigned axis, int dir)
 Step every code one cell along ±axis (dir>=0 -> +1, else -1).
template<unsigned Bits>
void encode2_host (const typename Morton< 2, Bits >::coord_type *x, const typename Morton< 2, Bits >::coord_type *y, typename Morton< 2, Bits >::code_type *out, std::size_t n)
template<unsigned Bits>
void encode3_host (const typename Morton< 3, Bits >::coord_type *x, const typename Morton< 3, Bits >::coord_type *y, const typename Morton< 3, Bits >::coord_type *z, typename Morton< 3, Bits >::code_type *out, std::size_t n)
template<unsigned Bits>
void decode2_host (const typename Morton< 2, Bits >::code_type *code, typename Morton< 2, Bits >::coord_type *x, typename Morton< 2, Bits >::coord_type *y, std::size_t n)
template<unsigned Bits>
void decode3_host (const typename Morton< 3, Bits >::code_type *code, typename Morton< 3, Bits >::coord_type *x, typename Morton< 3, Bits >::coord_type *y, typename Morton< 3, Bits >::coord_type *z, std::size_t n)
template<unsigned Dim, unsigned Bits>
void add_host (const typename Morton< Dim, Bits >::code_type *in, typename Morton< Dim, Bits >::code_type *out, std::size_t n, unsigned axis, long long delta)

Function Documentation

◆ encode2()

template<unsigned Bits, class ViewX, class ViewY, class ViewOut>
void morton::kokkos::encode2 ( const ViewX & x,
const ViewY & y,
const ViewOut & out )

Encode coordinate Views (2D) into a code View. x,y,out extents must match.

◆ encode3()

template<unsigned Bits, class ViewX, class ViewY, class ViewZ, class ViewOut>
void morton::kokkos::encode3 ( const ViewX & x,
const ViewY & y,
const ViewZ & z,
const ViewOut & out )

Encode coordinate Views (3D) into a code View.

◆ decode2()

template<unsigned Bits, class ViewCode, class ViewX, class ViewY>
void morton::kokkos::decode2 ( const ViewCode & code,
const ViewX & x,
const ViewY & y )

Decode a code View back to coordinate Views (2D).

◆ decode3()

template<unsigned Bits, class ViewCode, class ViewX, class ViewY, class ViewZ>
void morton::kokkos::decode3 ( const ViewCode & code,
const ViewX & x,
const ViewY & y,
const ViewZ & z )

Decode a code View back to coordinate Views (3D).

◆ add()

template<unsigned Dim, unsigned Bits, class ViewIn, class ViewOut>
void morton::kokkos::add ( const ViewIn & in,
const ViewOut & out,
unsigned axis,
long long delta )

Add a signed delta to axis of every code (wraps mod 2^Bits).

in/out may be the same View.

◆ sub()

template<unsigned Dim, unsigned Bits, class ViewIn, class ViewOut>
void morton::kokkos::sub ( const ViewIn & in,
const ViewOut & out,
unsigned axis,
typename Morton< Dim, Bits >::coord_type k )

Subtract k from axis of every code (wraps). Convenience over add.

◆ step()

template<unsigned Dim, unsigned Bits, class ViewIn, class ViewOut>
void morton::kokkos::step ( const ViewIn & in,
const ViewOut & out,
unsigned axis,
int dir )

Step every code one cell along ±axis (dir>=0 -> +1, else -1).

◆ encode2_host()

template<unsigned Bits>
void morton::kokkos::encode2_host ( const typename Morton< 2, Bits >::coord_type * x,
const typename Morton< 2, Bits >::coord_type * y,
typename Morton< 2, Bits >::code_type * out,
std::size_t n )

◆ encode3_host()

template<unsigned Bits>
void morton::kokkos::encode3_host ( const typename Morton< 3, Bits >::coord_type * x,
const typename Morton< 3, Bits >::coord_type * y,
const typename Morton< 3, Bits >::coord_type * z,
typename Morton< 3, Bits >::code_type * out,
std::size_t n )

◆ decode2_host()

template<unsigned Bits>
void morton::kokkos::decode2_host ( const typename Morton< 2, Bits >::code_type * code,
typename Morton< 2, Bits >::coord_type * x,
typename Morton< 2, Bits >::coord_type * y,
std::size_t n )

◆ decode3_host()

template<unsigned Bits>
void morton::kokkos::decode3_host ( const typename Morton< 3, Bits >::code_type * code,
typename Morton< 3, Bits >::coord_type * x,
typename Morton< 3, Bits >::coord_type * y,
typename Morton< 3, Bits >::coord_type * z,
std::size_t n )

◆ add_host()

template<unsigned Dim, unsigned Bits>
void morton::kokkos::add_host ( const typename Morton< Dim, Bits >::code_type * in,
typename Morton< Dim, Bits >::code_type * out,
std::size_t n,
unsigned axis,
long long delta )