5#include <rexlib/core/ndarray/array.hpp>
6#include <rexlib/core/ndarray/const_array_ref.hpp>
8#include <rexlib/core/numerical/numerical_type.hpp>
9#include <rexlib/core/numerical/scalar_value.hpp>
10#include <rexlib/core/hardware/memory_resource_affinity.hpp>
17class execution_context;
Description of the memory representation of a multidimensional array.
Definition array_descriptor.hpp:22
Container for multidimensional numeric data.
Definition array.hpp:31
Non-owning read-only reference to an array.
Definition const_array_ref.hpp:36
Pairs the hardware resources and the dispatch strategy used to run operations.
Definition execution_context.hpp:43
Owns a copy of a dynamically typed scalar value.
Definition scalar_value.hpp:35
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
array zeros(array_descriptor descriptor, memory_resource_affinity affinity, const execution_context &context, array *out=nullptr)
Create an array with all its elements set to zero.
array ones(array_descriptor descriptor, memory_resource_affinity affinity, const execution_context &context, array *out=nullptr)
Create an array with all its elements set to one.
void fill(array &out, const scalar_value &fill_value, const execution_context &context)
Set all the elements of an array to a given value.
memory_resource_affinity
Enumeration to query memory_resource according to its intended usage.
Definition memory_resource_affinity.hpp:12
array full(array_descriptor descriptor, memory_resource_affinity affinity, const scalar_value &fill_value, const execution_context &context, array *out=nullptr)
Create an array with all its elements set to a given value.
array linspace(const scalar_value &start, const scalar_value &stop, std::size_t count, numerical_type data_type, memory_resource_affinity affinity, const execution_context &context, array *out=nullptr)
Create a one dimensional array of evenly spaced samples.
array empty(array_descriptor descriptor, memory_resource_affinity affinity, const execution_context &context, array *out=nullptr)
Create an array without initializing its elements.
array copy(const_array_ref source, const execution_context &context, array *out=nullptr)
Create an array as a copy of an existing one.
numerical_type
Representation of all considered numerical types for computations.
Definition numerical_type.hpp:19
array arange(const scalar_value &start, const scalar_value &stop, const scalar_value &step, numerical_type data_type, memory_resource_affinity affinity, const execution_context &context, array *out=nullptr)
Create a one dimensional array holding an arithmetic progression.