E.V.E
v2023.02.15
Loading...
Searching...
No Matches

◆ store

auto eve::store = functor<store_t>
inlineconstexpr

Header file

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
// Regular overload
template<arithmetic_simd_value T, simd_compatible_ptr<T> Ptr>
void store(T value, Ptr ptr) noexcept; // 1
template<logical_simd_value T, logical_simd_compatible_ptr<T> Ptr>
void store(T value, Ptr ptr) noexcept; // 1
// Lanes masking
auto mul[conditional_expr auto c](/* any of the above overloads */) noexcept; // 2
}
Specifies that a type is a Conditional Expression.
Definition conditional.hpp:28
The concept value<T> is satisfied if and only if T satisfies either eve::scalar_value or eve::simd_va...
Definition value.hpp:34
constexpr auto mul
tuple_callable computing the product of its arguments.
Definition mul.hpp:128
constexpr auto store
Store the elements of a SIMD value into the given memory location.
Definition store.hpp:80
EVE Main Namespace.
Definition abi.hpp:19

Parameters

  • value : The SIMD value to store.
  • ptr : A pointer to the memory location where the elements of value will be stored.
  • c : A relative conditional expression masking the operation.

Overloads

  1. Stores the elements of value into the memory location pointed to by ptr.
  2. Same as 1. but lanes masked by the condition c will not be stored.

Example

#include <eve/eve.hpp>
#include <iostream>
int main()
{
float arr[4];
int iarr[4];
eve::logical<float> larr[4];
eve::wide<float, eve::fixed<4>> w = {3, 2, 1, 0};
eve::logical<eve::wide<float, eve::fixed<4>>> lw = {true, false, true, false};
eve::store(w, arr);
eve::store(lw, larr);
eve::store(lw, iarr);
std::cout << "arr: ";
for (auto val : arr) {
std::cout << val << " ";
}
std::cout << "\n";
std::cout << "larr: ";
for (auto val : larr) {
std::cout << val << " ";
}
std::cout << "\n";
std::cout << "iarr: ";
for (auto val : iarr) {
std::cout << val << " (" << (val ? "true" : "false") << ") ";
}
std::cout << "\n";
}
Wrapper for SIMD registers.
Definition wide.hpp:94