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::const_array Class Reference

Read-only view into an array. More...

#include <rexlib/core/ndarray/const_array.hpp>

Public Member Functions

 const_array ()
 Construct an uninitialized array view.
 
 const_array (std::shared_ptr< const array_implementation > implementation) noexcept
 Construct a const_array from a shared pointer to the implementation.
 
 const_array (const const_array &other)=delete
 
 const_array (const_array &&other) noexcept
 
const_array & operator= (const const_array &other)=delete
 
const_array & operator= (const_array &&other) noexcept
 
const array_descriptor & get_descriptor () const noexcept
 Get the descriptor of this array.
 
const buffer * get_storage () const noexcept
 Get the storage of this array.
 
std::shared_ptr< const buffer > share_storage () const noexcept
 Get the storage of this const_array.
 
const_array share () const noexcept
 Obtain an alias for this array.
 
access_hazard_tracker * get_access_hazard_tracker () const noexcept
 Get the tracker of the commands that access the memory of this array.
 
const array_implementation * get_implementation () const noexcept
 Get a pointer to the implementation.
 

Detailed Description

Read-only view into an array.

A const_array shares ownership of the implementation with another array, but it only allows read-only semantics with it.

See also
array

Constructor & Destructor Documentation

◆ const_array()

rexlib::const_array::const_array ( std::shared_ptr< const array_implementation >  implementation)
explicitnoexcept

Construct a const_array from a shared pointer to the implementation.

Parameters
implementationThe implementation to be owned by this.
Note
This function is not part of the public API and shall only be used internally or for testing purposes.

Member Function Documentation

◆ get_access_hazard_tracker()

access_hazard_tracker * rexlib::const_array::get_access_hazard_tracker ( ) const
noexcept

Get the tracker of the commands that access the memory of this array.

Arrays obtained from one another share one tracker. Arrays built separately over the same storage do not.

Returns
access_hazard_tracker* The tracker. nullptr if the const_array is not initialized.

◆ get_descriptor()

const array_descriptor & rexlib::const_array::get_descriptor ( ) const
noexcept

Get the descriptor of this array.

Returns
array_descriptor The descriptor.

◆ get_implementation()

const array_implementation * rexlib::const_array::get_implementation ( ) const
noexcept

Get a pointer to the implementation.

Returns
const array_implementation* Pointer to the implementation. nullptr if the const_array is not initialized.
Note
This method is meant to be used internally and for testing purposes, as the array_implementation is not publicly available.

◆ get_storage()

const buffer * rexlib::const_array::get_storage ( ) const
noexcept

Get the storage of this array.

Returns
const buffer* The storage. nullptr if the array is not initialized

◆ share()

const_array rexlib::const_array::share ( ) const
noexcept

Obtain an alias for this array.

Returns
const_array Another const_array referencing the contents of this array.

◆ share_storage()

std::shared_ptr< const buffer > rexlib::const_array::share_storage ( ) const
noexcept

Get the storage of this const_array.

Returns
std::shared_ptr<const buffer> The storage. nullptr if the const_array is not initialized

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