13#include "arcane/datatype/RealArrayVariant.h"
15#include "arcane/utils/Array.h"
16#include "arcane/utils/FatalErrorException.h"
17#include "arcane/utils/NumVector.h"
32extern "C++" ARCANE_CORE_EXPORT
void _arcaneTestRealArrayVariant()
37 Real3 a3{ 4.0, 7.2, 3.6 };
42 for (
Integer v = 0; v < nb_variants; ++v) {
43 std::cout <<
"A" << v <<
"=[ ";
44 for (
Integer i = 0; i < variants[v].size(); ++i)
45 std::cout << variants[v][i] <<
" ";
49#if defined(ARCANE_HAS_ACCELERATOR_API)
53 if (num_data_copy.to1DSpan() != num_data.to1DSpan())
57 RealN2 b2{ 2.0, 3.1 };
58 RealN3 b3{ 4.0, 7.2, 3.6 };
65 std::cout <<
"Z=" << z.vx() <<
"\n";
68 std::cout <<
"V=" << i <<
" v=" << z(i) <<
"\n";
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
Various mathematical functions.
Constant view of an array of type T.
Multi-dimensional arrays for numerical types accessible on accelerators.
Small fixed-size vector of N numerical data points.
Class managing a 2-dimensional real vector.
Class managing a 3-dimensional real vector.
__host__ __device__ Real normL2() const
Returns the L2 norm of the triplet $ .
Variant that can contain the types ConstArrayView, Real2, and Real3.
1D data vector with value semantics (STL style).
Real3 normalizedCrossProduct3(Real3 v1, Real3 v2)
Normalized cross product.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.