rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rexlib::joint_cursor Class Reference

Traversal state (indices and per-operand offsets) of a joint_layout. More...

#include <rexlib/core/layout/joint_cursor.hpp>

Public Member Functions

 joint_cursor () noexcept
 Default constructor.
 
 joint_cursor (std::size_t ndim, std::vector< std::ptrdiff_t > offsets)
 Construct a cursor at its initial state.
 
 joint_cursor (const joint_cursor &other)
 
 joint_cursor (joint_cursor &&other) noexcept
 
joint_cursor & operator= (const joint_cursor &other)
 
joint_cursor & operator= (joint_cursor &&other) noexcept
 
span< const std::size_t > get_indices () const noexcept
 Get the current multidimensional indices.
 
span< std::size_t > get_indices () noexcept
 Get the current multidimensional indices.
 
span< const std::ptrdiff_t > get_offsets () const noexcept
 Get the current offsets for each operand.
 
span< std::ptrdiff_t > get_offsets () noexcept
 Get the current offsets for each operand.
 

Detailed Description

Traversal state (indices and per-operand offsets) of a joint_layout.

Constructor & Destructor Documentation

◆ joint_cursor()

rexlib::joint_cursor::joint_cursor ( std::size_t  ndim,
std::vector< std::ptrdiff_t >  offsets 
)

Construct a cursor at its initial state.

Parameters
ndimNumber of dimensions. Initial indices will correspond to this amount of zeros.
offsetsThe base offsets for each operand.

Member Function Documentation

◆ get_indices() [1/2]

span< const std::size_t > rexlib::joint_cursor::get_indices ( ) const
noexcept

Get the current multidimensional indices.

Unless assigned to another iterator, the pointed span is guaranteed to remain constant.

Returns
span<const std::size_t> The indices.

◆ get_indices() [2/2]

span< std::size_t > rexlib::joint_cursor::get_indices ( )
noexcept

Get the current multidimensional indices.

Unless assigned to another iterator, the pointed span is guaranteed to remain constant.

Returns
span<std::size_t> The indices.

◆ get_offsets() [1/2]

span< const std::ptrdiff_t > rexlib::joint_cursor::get_offsets ( ) const
noexcept

Get the current offsets for each operand.

Unless assigned to another iterator, the pointed span is guaranteed to remain constant.

Returns
span<const std::ptrdiff_t> The offsets.

◆ get_offsets() [2/2]

span< std::ptrdiff_t > rexlib::joint_cursor::get_offsets ( )
noexcept

Get the current offsets for each operand.

Unless assigned to another iterator, the pointed span is guaranteed to remain constant.

Returns
span<std::ptrdiff_t> The offsets.

The documentation for this class was generated from the following file: