![]() |
Documentation 6b54b78464
|
Implementation of a portable SIMD type. More...
#include "../linear_algebra/vector_expressions.hpp"#include "../parallelization/omp_structure.hpp"#include <initializer_list>#include <algorithm>#include <cmath>#include "x86intrin.h"#include "special_vectorization.hpp"Go to the source code of this file.
Classes | |
| class | simd::Array< Scalar_t, N > |
| A simple SIMD type relying on implicit vectorization, i.e. done by the compiler, explicitly vectorized specializations are defined after. More... | |
| struct | simd::SizeTag::TWO |
| struct | simd::SizeTag::FOUR |
| struct | simd::SizeTag::EIGHT |
| struct | simd::SizeTag::SIXTEEN |
Namespaces | |
| namespace | simd |
| namespace | simd::SizeTag |
Macros | |
| #define | FOREACH for (size_t k = 0; k < N; ++k) |
| #define | ARRAY_BOILERPLATE |
| #define | MAKE_COMPOUND(OP) |
| #define | ARRAY_T Array<double, 2> |
| #define | SCALAR_T double |
| #define | REGISTER_T __m128d |
| #define | SIZE_TAG SizeTag::TWO() |
| #define | ARRAY_T Array<float, 4> |
| #define | SCALAR_T float |
| #define | REGISTER_T __m128 |
| #define | SIZE_TAG SizeTag::FOUR() |
Functions | |
| template<class T > | |
| constexpr size_t | simd::preferredLen () |
| Convert the SIMD size (bytes) to a lenght (num elems). | |
| template<> | |
| constexpr size_t | simd::preferredLen< su2double > () |
| __m128d | simd::set1_p (SizeTag::TWO, double p) |
| __m128d | simd::load_p (SizeTag::TWO, const double *p) |
| __m128d | simd::loadu_p (SizeTag::TWO, const double *p) |
| void | simd::store_p (double *p, __m128d x) |
| void | simd::storeu_p (double *p, __m128d x) |
| void | simd::stream_p (double *p, __m128d x) |
| __m128d | simd::add_p (__m128d a, __m128d b) |
| __m128d | simd::sub_p (__m128d a, __m128d b) |
| __m128d | simd::mul_p (__m128d a, __m128d b) |
| __m128d | simd::div_p (__m128d a, __m128d b) |
| __m128d | simd::max_p (__m128d a, __m128d b) |
| __m128d | simd::min_p (__m128d a, __m128d b) |
| __m128d | simd::eq_p (__m128d a, __m128d b) |
| __m128d | simd::lt_p (__m128d a, __m128d b) |
| __m128d | simd::le_p (__m128d a, __m128d b) |
| __m128d | simd::ne_p (__m128d a, __m128d b) |
| __m128d | simd::ge_p (__m128d a, __m128d b) |
| __m128d | simd::gt_p (__m128d a, __m128d b) |
| __m128d | simd::sqrt_p (__m128d x) |
| __m128d | simd::abs_p (__m128d x) |
| __m128d | simd::neg_p (__m128d x) |
| __m128d | simd::sign_p (__m128d x) |
| __m128 | simd::set1_p (SizeTag::FOUR, float p) |
| __m128 | simd::load_p (SizeTag::FOUR, const float *p) |
| __m128 | simd::loadu_p (SizeTag::FOUR, const float *p) |
| void | simd::store_p (float *p, __m128 x) |
| void | simd::storeu_p (float *p, __m128 x) |
| void | simd::stream_p (float *p, __m128 x) |
| __m128 | simd::add_p (__m128 a, __m128 b) |
| __m128 | simd::sub_p (__m128 a, __m128 b) |
| __m128 | simd::mul_p (__m128 a, __m128 b) |
| __m128 | simd::div_p (__m128 a, __m128 b) |
| __m128 | simd::max_p (__m128 a, __m128 b) |
| __m128 | simd::min_p (__m128 a, __m128 b) |
| __m128 | simd::eq_p (__m128 a, __m128 b) |
| __m128 | simd::lt_p (__m128 a, __m128 b) |
| __m128 | simd::le_p (__m128 a, __m128 b) |
| __m128 | simd::ne_p (__m128 a, __m128 b) |
| __m128 | simd::ge_p (__m128 a, __m128 b) |
| __m128 | simd::gt_p (__m128 a, __m128 b) |
| __m128 | simd::sqrt_p (__m128 x) |
| __m128 | simd::abs_p (__m128 x) |
| __m128 | simd::neg_p (__m128 x) |
| __m128 | simd::sign_p (__m128 x) |
Variables | |
| constexpr size_t | simd::PREFERRED_SIZE = 16 |
| constexpr uint64_t | simd::abs_mask_d = 0x7FFFFFFFFFFFFFFFL |
| constexpr uint32_t | simd::abs_mask_s = 0x7FFFFFFFU |
| constexpr uint64_t | simd::sign_mask_d = 0x8000000000000000L |
| constexpr uint32_t | simd::sign_mask_s = 0x80000000U |
Implementation of a portable SIMD type.
SU2 Project Website: https://su2code.github.io
The SU2 Project is maintained by the SU2 Foundation (http://su2foundation.org)
Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
SU2 is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
SU2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with SU2. If not, see http://www.gnu.org/licenses/.
| #define ARRAY_BOILERPLATE |
| #define FOREACH for (size_t k = 0; k < N; ++k) |