atlas::array namespace

Contains classes to operate with multidimensional arrays.

Classes

class Array
class ArrayAlignment
class ArrayDataStore
class ArrayLayout
class ArrayShape
class ArraySpec
class ArrayStrides
template<typename Value>
class ArrayT
template<typename Value, int Rank>
class ArrayView
class DataType
template<typename Value, int Rank>
class IndexView
class label
template<typename Value, int Rank>
class LocalView
Multi-dimensional access existing POD array pointer.
class Range
template<typename T>
class SVector
template<typename T>
class Vector
template<typename T>
class VectorView

Typedefs

using ArrayIdx = std::vector<idx_t>
using ArrayViewVariant = detail::Variant<detail::VariantValueTypes, detail::VariantRanks>
Variant containing all supported non-const ArrayView alternatives.
using ConstArrayViewVariant = detail::Variant<detail::VariantValueTypes::add_const, detail::VariantRanks>
Variant containing all supported const ArrayView alternatives.
template<typename Value, int Rank>
using View = LocalView<Value, Rank>

Functions

template<typename... idx_t>
auto make_idx(idx_t... indices) -> ArrayIdx
template<typename... idx_t>
auto make_layout(idx_t... indices) -> ArrayLayout
auto make_shape(std::initializer_list<idx_t> sizes) -> ArrayShape
template<typename... idx_t>
auto make_shape(idx_t... indices) -> ArrayShape
auto make_strides(std::initializer_list<idx_t> sizes) -> ArrayStrides
template<typename... idx_t>
auto make_strides(idx_t... indices) -> ArrayStrides
auto make_view_variant(Array& array) -> ArrayViewVariant
Create an ArrayView and assign to an ArrayViewVariant.
auto make_view_variant(const Array& array) -> ConstArrayViewVariant
Create a const ArrayView and assign to an ArrayViewVariant.
auto make_host_view_variant(Array& array) -> ArrayViewVariant
Create a host ArrayView and assign to an ArrayViewVariant.
auto make_host_view_variant(const Array& array) -> ConstArrayViewVariant
Create a const host ArrayView and assign to an ArrayViewVariant.
auto make_device_view_variant(Array& array) -> ArrayViewVariant
Create a device ArrayView and assign to an ArrayViewVariant.
auto make_device_view_variant(const Array& array) -> ConstArrayViewVariant
Create a const device ArrayView and assign to an ArrayViewVariant.
template<int... Ranks, typename View>
auto is_rank(const View&) -> bool constexpr
Return true if View::rank() is any of Ranks...
template<typename... ValueTypes, typename View>
auto is_value_type(const View&) -> bool constexpr
Return true if View::value_type is any of ValuesTypes...
template<typename... ValueTypes, typename View>
auto is_non_const_value_type(const View&) -> bool constexpr
Return true if View::non_const_value_type is any of ValuesTypes...
auto make_indexview<idx_t, 1>(Array&) -> template IndexView<idx_t, 1>
auto make_indexview<idx_t, 2>(Array&) -> template IndexView<idx_t, 2>
auto make_indexview<const idx_t, 1>(Array&) -> template IndexView<const idx_t, 1>
auto make_indexview<const idx_t, 2>(Array&) -> template IndexView<const idx_t, 2>
auto make_indexview<idx_t, 1>(const Array&) -> template IndexView<const idx_t, 1>
auto make_indexview<idx_t, 2>(const Array&) -> template IndexView<const idx_t, 2>
template<typename T>
auto make_host_vector_view(Vector<T> vector_) -> VectorView<T>
template<typename T>
auto make_device_vector_view(Vector<T> vector_) -> VectorView<T>
template<typename Value, int Rank>
auto make_view(Array& array) -> ArrayView<Value, Rank>
template<typename Value, int Rank>
auto make_view(const Array& array) -> ArrayView<const Value, Rank>
template<class Value, int Rank, ENABLE_IF_NOT_CONST>
auto make_view(Value data[], const ArrayShape& shape) -> LocalView<Value, Rank>
template<class Value, int Rank, ENABLE_IF_NOT_CONST>
auto make_view(const Value data[], const ArrayShape& shape) -> LocalView<const Value, Rank>
template<class Value, int Rank, ENABLE_IF_CONST>
auto make_view(typename std::remove_const<Value>::type data[], const ArrayShape& shape) -> LocalView<Value, Rank>
template<typename Value, unsigned int Rank, ENABLE_IF_NOT_CONST>
auto make_view(Value data[], size_t size) -> LocalView<Value, Rank>
template<typename Value, unsigned int Rank, ENABLE_IF_NOT_CONST>
auto make_view(const Value data[], size_t size) -> LocalView<const Value, Rank>
template<typename Value, unsigned int Rank, ENABLE_IF_CONST>
auto make_view(typename std::remove_const<Value>::type data[], size_t size) -> LocalView<Value, Rank>
template<typename Value, int Rank>
auto make_host_view(Array& array) -> ArrayView<Value, Rank>
template<typename Value, int Rank>
auto make_host_view(const Array& array) -> ArrayView<const Value, Rank>
template<typename Value, int Rank>
auto make_device_view(Array& array) -> ArrayView<Value, Rank>
template<typename Value, int Rank>
auto make_device_view(const Array& array) -> ArrayView<const Value, Rank>
template<typename Value, int Rank>
auto make_indexview(Array& array) -> IndexView<Value, Rank>
template<typename Value, int Rank>
auto make_indexview(const Array& array) -> IndexView<const Value, Rank>
template<typename Value, int Rank>
auto make_host_indexview(Array& array) -> IndexView<Value, Rank>
template<typename Value, int Rank>
auto make_host_indexview(const Array& array) -> IndexView<const Value, Rank>
void interprete(const Array&, atlas::io::ArrayReference&)
void decode(const atlas::io::Metadata&, const atlas::io::Data&, Array&)
template<>
auto DataType::str<std::byte>() -> std::string
template<>
auto DataType::str<const std::byte>() -> std::string
template<>
auto DataType::kind<std::byte>() -> DataType::kind_t constexpr
template<>
auto DataType::kind<const std::byte>() -> DataType::kind_t constexpr
auto operator==(DataType dt1, DataType dt2) -> bool
auto operator!=(DataType dt1, DataType dt2) -> bool
auto operator==(DataType dt, DataType::kind_t kind) -> bool
auto operator!=(DataType dt, DataType::kind_t kind) -> bool
auto operator==(DataType::kind_t kind, DataType dt) -> bool
auto operator!=(DataType::kind_t kind, DataType dt) -> bool
template<typename DATATYPE>
auto make_datatype() -> DataType

Typedef documentation

typedef std::vector<idx_t> atlas::array::ArrayIdx

using atlas::array::ArrayViewVariant = detail::Variant<detail::VariantValueTypes, detail::VariantRanks>

Variant containing all supported non-const ArrayView alternatives.

using atlas::array::ConstArrayViewVariant = detail::Variant<detail::VariantValueTypes::add_const, detail::VariantRanks>

Variant containing all supported const ArrayView alternatives.

template<typename Value, int Rank>
using atlas::array::View = LocalView<Value, Rank>

Function documentation

template<typename... idx_t>
ArrayIdx atlas::array::make_idx(idx_t... indices)

template<typename... idx_t>
ArrayLayout atlas::array::make_layout(idx_t... indices)

template<typename... idx_t>
ArrayShape atlas::array::make_shape(idx_t... indices)

template<typename... idx_t>
ArrayStrides atlas::array::make_strides(idx_t... indices)

ArrayViewVariant atlas::array::make_view_variant(Array& array)

Create an ArrayView and assign to an ArrayViewVariant.

ConstArrayViewVariant atlas::array::make_view_variant(const Array& array)

Create a const ArrayView and assign to an ArrayViewVariant.

ArrayViewVariant atlas::array::make_host_view_variant(Array& array)

Create a host ArrayView and assign to an ArrayViewVariant.

ConstArrayViewVariant atlas::array::make_host_view_variant(const Array& array)

Create a const host ArrayView and assign to an ArrayViewVariant.

ArrayViewVariant atlas::array::make_device_view_variant(Array& array)

Create a device ArrayView and assign to an ArrayViewVariant.

ConstArrayViewVariant atlas::array::make_device_view_variant(const Array& array)

Create a const device ArrayView and assign to an ArrayViewVariant.

template<int... Ranks, typename View>
bool atlas::array::is_rank(const View&) constexpr

Return true if View::rank() is any of Ranks...

template<typename... ValueTypes, typename View>
bool atlas::array::is_value_type(const View&) constexpr

Return true if View::value_type is any of ValuesTypes...

template<typename... ValueTypes, typename View>
bool atlas::array::is_non_const_value_type(const View&) constexpr

Return true if View::non_const_value_type is any of ValuesTypes...

template IndexView<const idx_t, 1> atlas::array::make_indexview<const idx_t, 1>(Array&)

template IndexView<const idx_t, 2> atlas::array::make_indexview<const idx_t, 2>(Array&)

template IndexView<const idx_t, 1> atlas::array::make_indexview<idx_t, 1>(const Array&)

template IndexView<const idx_t, 2> atlas::array::make_indexview<idx_t, 2>(const Array&)

template<typename T>
VectorView<T> atlas::array::make_host_vector_view(Vector<T> vector_)

template<typename T>
VectorView<T> atlas::array::make_device_vector_view(Vector<T> vector_)

template<typename Value, int Rank>
ArrayView<Value, Rank> atlas::array::make_view(Array& array)

template<typename Value, int Rank>
ArrayView<const Value, Rank> atlas::array::make_view(const Array& array)

template<class Value, int Rank, ENABLE_IF_NOT_CONST>
LocalView<Value, Rank> atlas::array::make_view(Value data[], const ArrayShape& shape)

template<class Value, int Rank, ENABLE_IF_NOT_CONST>
LocalView<const Value, Rank> atlas::array::make_view(const Value data[], const ArrayShape& shape)

template<class Value, int Rank, ENABLE_IF_CONST>
LocalView<Value, Rank> atlas::array::make_view(typename std::remove_const<Value>::type data[], const ArrayShape& shape)

template<typename Value, unsigned int Rank, ENABLE_IF_NOT_CONST>
LocalView<Value, Rank> atlas::array::make_view(Value data[], size_t size)

template<typename Value, unsigned int Rank, ENABLE_IF_NOT_CONST>
LocalView<const Value, Rank> atlas::array::make_view(const Value data[], size_t size)

template<typename Value, unsigned int Rank, ENABLE_IF_CONST>
LocalView<Value, Rank> atlas::array::make_view(typename std::remove_const<Value>::type data[], size_t size)

template<typename Value, int Rank>
ArrayView<Value, Rank> atlas::array::make_host_view(Array& array)

template<typename Value, int Rank>
ArrayView<const Value, Rank> atlas::array::make_host_view(const Array& array)

template<typename Value, int Rank>
ArrayView<Value, Rank> atlas::array::make_device_view(Array& array)

template<typename Value, int Rank>
ArrayView<const Value, Rank> atlas::array::make_device_view(const Array& array)

template<typename Value, int Rank>
IndexView<Value, Rank> atlas::array::make_indexview(Array& array)

template<typename Value, int Rank>
IndexView<const Value, Rank> atlas::array::make_indexview(const Array& array)

template<typename Value, int Rank>
IndexView<Value, Rank> atlas::array::make_host_indexview(Array& array)

template<typename Value, int Rank>
IndexView<const Value, Rank> atlas::array::make_host_indexview(const Array& array)

void atlas::array::interprete(const Array&, atlas::io::ArrayReference&)

void atlas::array::decode(const atlas::io::Metadata&, const atlas::io::Data&, Array&)

template<>
std::string atlas::array::DataType::str<std::byte>()

template<>
DataType::kind_t atlas::array::DataType::kind<std::byte>() constexpr

template<>
DataType::kind_t atlas::array::DataType::kind<const std::byte>() constexpr

bool atlas::array::operator==(DataType dt1, DataType dt2)

bool atlas::array::operator!=(DataType dt1, DataType dt2)

bool atlas::array::operator==(DataType dt, DataType::kind_t kind)

bool atlas::array::operator!=(DataType dt, DataType::kind_t kind)

bool atlas::array::operator==(DataType::kind_t kind, DataType dt)

bool atlas::array::operator!=(DataType::kind_t kind, DataType dt)

template<typename DATATYPE>
DataType atlas::array::make_datatype()

This website is beyond its original expiry date and the content may be out of date. The site owner has been notified and may choose to extend the expiry date and remove this banner. If you have any questions about this, please visit our support portal.