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 Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
rexlib::operand_specification Class Reference

Shape and data type of an operand. More...

#include <rexlib/core/operation/operand_specification.hpp>

Public Types

using shape_type = std::vector< std::size_t >
 

Public Member Functions

 operand_specification () noexcept
 Construct a specification with no axes and an unknown type.
 
 operand_specification (shape_type shape, numerical_type data_type) noexcept
 Construct a specification.
 
 operand_specification (const operand_specification &other)=default
 
 operand_specification (operand_specification &&other) noexcept=default
 
operand_specification & operator= (const operand_specification &other)=default
 
operand_specification & operator= (operand_specification &&other) noexcept=default
 
const shape_type & get_shape () const noexcept
 Get the extent of every axis.
 
void set_shape (shape_type shape) noexcept
 Set the extent of every axis.
 
numerical_type get_data_type () const noexcept
 Get the type of the elements.
 
void set_data_type (numerical_type data_type) noexcept
 Set the type of the elements.
 

Static Public Member Functions

static operand_specification from_descriptor (const array_descriptor &descriptor)
 Get the specification of an operand with a given descriptor.
 

Friends

bool operator== (const operand_specification &lhs, const operand_specification &rhs) noexcept
 
bool operator!= (const operand_specification &lhs, const operand_specification &rhs) noexcept
 

Detailed Description

Shape and data type of an operand.

Describes an operand apart from where and how its elements are stored, so it holds neither strides nor an offset.

See also
operation_signature

Constructor & Destructor Documentation

◆ operand_specification()

rexlib::operand_specification::operand_specification ( shape_type  shape,
numerical_type  data_type 
)
noexcept

Construct a specification.

Parameters
shapeThe extent of every axis.
data_typeThe type of the elements.

Member Function Documentation

◆ from_descriptor()

static operand_specification rexlib::operand_specification::from_descriptor ( const array_descriptor &  descriptor)
static

Get the specification of an operand with a given descriptor.

Parameters
descriptorThe descriptor of the operand.
Returns
operand_specification The extents and the data type of descriptor.

◆ get_data_type()

numerical_type rexlib::operand_specification::get_data_type ( ) const
noexcept

Get the type of the elements.

Returns
numerical_type The data type.

◆ get_shape()

const shape_type & rexlib::operand_specification::get_shape ( ) const
noexcept

Get the extent of every axis.

Returns
const shape_type& The shape.

◆ set_data_type()

void rexlib::operand_specification::set_data_type ( numerical_type  data_type)
noexcept

Set the type of the elements.

Parameters
data_typeThe new data type.

◆ set_shape()

void rexlib::operand_specification::set_shape ( shape_type  shape)
noexcept

Set the extent of every axis.

Parameters
shapeThe new shape.

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