Template Class Function#
Defined in File function.hpp
Class Documentation#
-
template<typename desc, typename Functor_, typename ...Args>
class Function# Public Types
-
using ShapeType = typename typetraits::TypeInfo<Type>::ShapeType#
-
using Scalar = typename typetraits::TypeInfo<Type>::Scalar#
-
using Backend = typename typetraits::TypeInfo<Type>::Backend#
-
using Packet = typename typetraits::TypeInfo<Scalar>::Packet#
-
using Iterator = detail::ArrayIterator<Function>#
Public Functions
-
Function() = default#
-
explicit Function(Functor &&functor, Args&&... args)#
Constructs a Function from a functor and arguments.
- Parameters
functor – The functor to use.
args – The arguments to use.
-
Function(const Function &other) = default#
Constructs a Function from another function.
- Parameters
other – The Function to copy.
-
Function(Function &&other) noexcept = default#
Construct a Function from a temporary function.
- Parameters
other – The Function to move.
-
auto size() const -> size_t#
-
auto ndim() const -> size_t#
-
auto shape() const -> const ShapeType&#
Return the shape of the Function’s result
- Returns
The shape of the Function’s result
-
auto eval() const#
Return an evaluated Array object
- Returns
-
auto operator[](int64_t index) const#
-
Packet packet(size_t index) const#
Evaluates the function at the given index, returning a Packet result.
- Parameters
index – The index to evaluate at.
- Returns
The result of the function (vectorized).
-
Scalar scalar(size_t index) const#
Evaluates the function at the given index, returning a Scalar result.
- Parameters
index – The index to evaluate at.
- Returns
The result of the function (scalar).
Public Static Attributes
-
static constexpr bool argsAreSameType = !std::is_same_v<decltype(scalarTypesAreSame<Args...>()), std::false_type>#
-
using ShapeType = typename typetraits::TypeInfo<Type>::ShapeType#