12#ifndef ARCANE_IMPL_DATAOPERATION_H
13#define ARCANE_IMPL_DATAOPERATION_H
20#include "arcane/utils/Real2.h"
21#include "arcane/utils/Real3.h"
22#include "arcane/utils/Real2x2.h"
23#include "arcane/utils/Real3x3.h"
24#include "arcane/utils/Float16.h"
25#include "arcane/utils/BFloat16.h"
27#include "arcane/datatype/IDataOperation.h"
29#include "arcane/Parallel.h"
40template <
typename DataOperator>
47 DataOperationT(
const DataOperator& op)
53 template <
typename DataType>
void
56 for (
Int32 i = 0, n = input.
size(); i < n; ++i)
57 output[i] = m_operator(output[i], input[i]);
64 _applyView(output, input);
68 _applyView(output, input);
72 _applyView(output, input);
76 _applyView(output, input);
80 _applyView(output, input);
84 _applyView(output, input);
88 _applyView(output, input);
92 _applyView(output, input);
96 _applyView(output, input);
100 _applyView(output, input);
104 _applyView(output, input);
108 _applyView(output, input);
112 _applyView(output, input);
117 template <
typename DataType>
void
120 for (
Int64 i = 0, n = input.
size(); i < n; ++i)
121 output[i] = m_operator(output[i], input[i]);
128 _applySpan(output, input);
132 _applySpan(output, input);
136 _applySpan(output, input);
140 _applySpan(output, input);
144 _applySpan(output, input);
148 _applySpan(output, input);
152 _applySpan(output, input);
156 _applySpan(output, input);
160 _applySpan(output, input);
164 _applySpan(output, input);
168 _applySpan(output, input);
172 _applySpan(output, input);
176 _applySpan(output, input);
181 DataOperator m_operator;
Types and functions associated with the classes SpanImpl, SmallSpan and Span.
Types and functions associated with the classes ArrayView and ConstArrayView.
Modifiable view of an array of type T.
Constant view of an array of type T.
constexpr Integer size() const noexcept
Number of elements in the array.
Interface of an operation on a data.
constexpr __host__ __device__ SizeType size() const noexcept
Returns the size of the array.
View of an array of elements of type T.
eReduceType
Supported reduction types.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ArrayView< Int64 > Int64ArrayView
C equivalent of a 1D array of 64-bit integers.
ConstArrayView< Real3 > Real3ConstArrayView
C equivalent of a 1D array of Real3.
ArrayView< Real2x2 > Real2x2ArrayView
C equivalent of a 1D array of Real2x2.
ArrayView< Byte > ByteArrayView
C equivalent of a 1D array of characters.
std::int64_t Int64
Signed integer type of 64 bits.
ArrayView< Real3 > Real3ArrayView
C equivalent of a 1D array of Real3.
ArrayView< Int16 > Int16ArrayView
C equivalent of a 1D array of 16-bit integers.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
ArrayView< Real3x3 > Real3x3ArrayView
C equivalent of a 1D array of Real3x3.
ConstArrayView< Int16 > Int16ConstArrayView
C equivalent of a 1D array of 16-bit integers.
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
ArrayView< Int32 > Int32ArrayView
C equivalent of a 1D array of 32-bit integers.
ConstArrayView< Byte > ByteConstArrayView
C equivalent of a 1D array of characters.
ConstArrayView< Real2 > Real2ConstArrayView
C equivalent of a 1D array of Real2.
ArrayView< Real2 > Real2ArrayView
C equivalent of a 1D array of Real2.
ArrayView< Real > RealArrayView
C equivalent of a 1D array of reals.
ConstArrayView< Real3x3 > Real3x3ConstArrayView
C equivalent of a 1D array of Real3x3.
ConstArrayView< Real2x2 > Real2x2ConstArrayView
C equivalent of a 1D array of Real2x2.
std::int32_t Int32
Signed integer type of 32 bits.
ConstArrayView< Real > RealConstArrayView
C equivalent of a 1D array of reals.