occ
Loading...
Searching...
No Matches
occ::core::numpy::NumpyArray Struct Reference

#include <numpy.h>

Collaboration diagram for occ::core::numpy::NumpyArray:
[legend]

Public Member Functions

 NumpyArray (const std::vector< size_t > &shape_, size_t word_size_, bool column_major_)
 
 NumpyArray ()
 
template<typename ScalarType >
ScalarType * data ()
 
template<typename ScalarType >
const ScalarType * data () const
 
template<typename ScalarType >
std::vector< ScalarType > as_std_vector () const
 
size_t size_bytes () const
 

Public Attributes

std::shared_ptr< std::vector< char > > p_data_buffer
 
std::vector< size_t > shape
 
size_t word_size
 
bool column_major {false}
 
size_t size
 

Constructor & Destructor Documentation

◆ NumpyArray() [1/2]

occ::core::numpy::NumpyArray::NumpyArray ( const std::vector< size_t > &  shape_,
size_t  word_size_,
bool  column_major_ 
)
inline

◆ NumpyArray() [2/2]

occ::core::numpy::NumpyArray::NumpyArray ( )
inline

Member Function Documentation

◆ as_std_vector()

template<typename ScalarType >
std::vector< ScalarType > occ::core::numpy::NumpyArray::as_std_vector ( ) const
inline

◆ data() [1/2]

template<typename ScalarType >
ScalarType * occ::core::numpy::NumpyArray::data ( )
inline

◆ data() [2/2]

template<typename ScalarType >
const ScalarType * occ::core::numpy::NumpyArray::data ( ) const
inline

◆ size_bytes()

size_t occ::core::numpy::NumpyArray::size_bytes ( ) const
inline

Member Data Documentation

◆ column_major

bool occ::core::numpy::NumpyArray::column_major {false}

◆ p_data_buffer

std::shared_ptr<std::vector<char> > occ::core::numpy::NumpyArray::p_data_buffer

◆ shape

std::vector<size_t> occ::core::numpy::NumpyArray::shape

◆ size

size_t occ::core::numpy::NumpyArray::size

◆ word_size

size_t occ::core::numpy::NumpyArray::word_size

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