 |
LibraryLink Utilities
3.0.1
Modern C++ wrapper over LibraryLink and WSTP
|
Go to the documentation of this file.
5 #ifndef LLU_CONTAINERS_GENERIC_NUMERICARRAY_HPP
6 #define LLU_CONTAINERS_GENERIC_NUMERICARRAY_HPP
40 MContainer(numericarray_data_t type, mint rank,
const mint* dims);
77 numericarray_data_t
type()
const override {
92 Container cloneImpl()
const override;
98 mint shareCountImpl() const noexcept
override {
103 void passImpl(MArgument& res)
const noexcept
override {
104 MArgument_setMNumericArray(res, this->getContainer());
110 #endif // LLU_CONTAINERS_GENERIC_NUMERICARRAY_HPP
Template of the base class for all generic containers.
Definition: Base.hpp:35
Abstract class that defines a basic set of operations on a numeric array.
Definition: Interfaces.h:106
numericarray_data_t type() const override
Get the data type of this array.
Definition: Generic/NumericArray.hpp:77
MContainer specialization for MNumericArray.
Definition: Generic/NumericArray.hpp:23
Main namespace of LibraryLink Utilities.
Definition: Queue.h:13
MContainer is an abstract class template for generic containers. Only specializations shall be used.
Definition: Base.hpp:245
MContainer< MArgumentType::NumericArray > NumericArray
NumericArray stands for a GenericNumericArray - type agnostic wrapper over MNumericArray.
Definition: TypedMArgument.h:53
mint getRank() const override
Get rank.
Definition: Generic/NumericArray.hpp:62
ConversionMethod
Possible methods of handling out-of-range data when converting a NumericArray to different type.
Definition: Utilities.hpp:207
@ Library
The library (LLU) is responsible for managing the container's memory. Used for Manual passing and con...
MContainer()=default
Default constructor, the MContainer does not manage any instance of MNumericArray.
mint getFlattenedLength() const override
Get length.
Definition: Generic/NumericArray.hpp:72
Definitions of MContainerBase and MContainer class templates.
void * rawData() const noexcept override
Get access to the raw data.
Definition: Generic/NumericArray.hpp:82
mint const * getDimensions() const override
Get dimensions.
Definition: Generic/NumericArray.hpp:67
static const st_WolframNumericArrayLibrary_Functions * NumericArrayAPI()
Get a pointer to structure with function pointers to MNumericArray API.
Definition: LibraryData.cpp:33
MArgumentType
Strongly type enum with possible types of data stored in MArgument.
Definition: MArgument.h:22
MContainer clone() const
Clone this MContainer, performs a deep copy of the underlying MNumericArray.
Definition: Generic/NumericArray.hpp:57