10#ifndef EIGEN_CXX11_TENSOR_TENSOR_FFT_H
11#define EIGEN_CXX11_TENSOR_TENSOR_FFT_H
14#include "./InternalHeaderCheck.h"
21 EIGEN_DEVICE_FUNC T operator()(
const T& val)
const {
27struct MakeComplex<true> {
29 EIGEN_DEVICE_FUNC internal::make_complex_t<T> operator()(
const T& val)
const {
30 return internal::make_complex_t<T>(val, T(0));
34template <
int ResultType>
37 T operator()(
const T& val)
const {
43struct PartOf<RealPart> {
44 template <typename T, typename EnableIf = std::enable_if_t<NumTraits<T>::IsComplex>>
45 typename NumTraits<T>::Real operator()(
const T& val)
const {
46 return Eigen::numext::real(val);
51struct PartOf<ImagPart> {
52 template <typename T, typename EnableIf = std::enable_if_t<NumTraits<T>::IsComplex>>
53 typename NumTraits<T>::Real operator()(
const T& val)
const {
54 return Eigen::numext::imag(val);
59template <
typename FFT,
typename XprType,
int FFTResultType,
int FFTDir>
60struct traits<TensorFFTOp<FFT, XprType, FFTResultType, FFTDir> > :
public traits<XprType> {
61 typedef traits<XprType> XprTraits;
62 typedef typename XprTraits::Scalar Scalar;
63 typedef typename NumTraits<Scalar>::Real RealScalar;
64 typedef make_complex_t<Scalar> ComplexScalar;
65 typedef typename XprTraits::Scalar InputScalar;
66 typedef std::conditional_t<FFTResultType == RealPart || FFTResultType == ImagPart, RealScalar, ComplexScalar>
68 typedef typename XprTraits::StorageKind StorageKind;
69 typedef typename XprTraits::Index
Index;
70 typedef typename XprType::Nested Nested;
71 typedef std::remove_reference_t<Nested> Nested_;
72 static constexpr int NumDimensions = XprTraits::NumDimensions;
73 static constexpr int Layout = XprTraits::Layout;
74 typedef typename traits<XprType>::PointerType PointerType;
77template <
typename FFT,
typename XprType,
int FFTResultType,
int FFTDirection>
78struct eval<TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection>, Eigen::Dense> {
79 typedef const TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection>& type;
82template <
typename FFT,
typename XprType,
int FFTResultType,
int FFTDirection>
83struct nested<TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection>, 1,
84 typename eval<TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection> >::type> {
85 typedef TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection> type;
100template <
typename FFT,
typename XprType,
int FFTResultType,
int FFTDir>
101class TensorFFTOp :
public TensorBase<TensorFFTOp<FFT, XprType, FFTResultType, FFTDir>, ReadOnlyAccessors> {
103 typedef typename Eigen::internal::traits<TensorFFTOp>::Scalar Scalar;
105 typedef internal::make_complex_t<Scalar> ComplexScalar;
106 typedef std::conditional_t<FFTResultType == RealPart || FFTResultType == ImagPart, RealScalar, ComplexScalar>
108 typedef OutputScalar CoeffReturnType;
109 typedef typename Eigen::internal::nested<TensorFFTOp>::type Nested;
110 typedef typename Eigen::internal::traits<TensorFFTOp>::StorageKind StorageKind;
111 typedef typename Eigen::internal::traits<TensorFFTOp>::Index Index;
113 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFFTOp(
const XprType& expr,
const FFT& fft) : m_xpr(expr), m_fft(fft) {}
115 EIGEN_DEVICE_FUNC
const FFT& fft()
const {
return m_fft; }
117 EIGEN_DEVICE_FUNC
const internal::remove_all_t<typename XprType::Nested>& expression()
const {
return m_xpr; }
120 typename XprType::Nested m_xpr;
125template <
typename FFT,
typename ArgType,
typename Device,
int FFTResultType,
int FFTDir>
128 typedef typename XprType::Index
Index;
129 static constexpr int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensions>::value;
131 typedef typename XprType::Scalar
Scalar;
133 typedef internal::make_complex_t<Scalar> ComplexScalar;
134 typedef typename TensorEvaluator<ArgType, Device>::Dimensions InputDimensions;
135 typedef internal::traits<XprType> XprTraits;
136 typedef typename XprTraits::Scalar InputScalar;
137 typedef std::conditional_t<FFTResultType == RealPart || FFTResultType == ImagPart, RealScalar, ComplexScalar>
140 typedef typename PacketType<OutputScalar, Device>::type PacketReturnType;
141 static constexpr int PacketSize = internal::unpacket_traits<PacketReturnType>::size;
142 typedef StorageMemory<CoeffReturnType, Device> Storage;
143 typedef typename Storage::Type EvaluatorPointerType;
145 static constexpr int Layout = TensorEvaluator<ArgType, Device>::Layout;
150 PreferBlockAccess =
false,
156 typedef internal::TensorBlockNotImplemented TensorBlock;
159 EIGEN_STRONG_INLINE TensorEvaluator(
const XprType& op,
const Device& device)
160 : m_fft(op.fft()), m_impl(op.expression(), device), m_data(NULL), m_device(device) {
161 const typename TensorEvaluator<ArgType, Device>::Dimensions& input_dims = m_impl.dimensions();
162 for (
int i = 0; i < NumDims; ++i) {
163 eigen_assert(input_dims[i] > 0);
164 m_dimensions[i] = input_dims[i];
167 if (
static_cast<int>(Layout) ==
static_cast<int>(
ColMajor)) {
169 for (
int i = 1; i < NumDims; ++i) {
170 m_strides[i] = m_strides[i - 1] * m_dimensions[i - 1];
173 m_strides[NumDims - 1] = 1;
174 for (
int i = NumDims - 2; i >= 0; --i) {
175 m_strides[i] = m_strides[i + 1] * m_dimensions[i + 1];
178 m_size = m_dimensions.TotalSize();
181 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const Dimensions& dimensions()
const {
return m_dimensions; }
183 EIGEN_STRONG_INLINE
bool evalSubExprsIfNeeded(EvaluatorPointerType data) {
184 m_impl.evalSubExprsIfNeeded(NULL);
189 m_data = (EvaluatorPointerType)m_device.get(
190 (CoeffReturnType*)(m_device.allocate_temp(
sizeof(CoeffReturnType) * m_size)));
196 EIGEN_STRONG_INLINE
void cleanup() {
198 m_device.deallocate(m_data);
204 EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE CoeffReturnType coeff(Index index)
const {
return m_data[index]; }
206 template <
int LoadMode>
207 EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE PacketReturnType packet(Index index)
const {
208 return internal::ploadt<PacketReturnType, LoadMode>(m_data + index);
211 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(
bool vectorized)
const {
212 return TensorOpCost(
sizeof(CoeffReturnType), 0, 0, vectorized, PacketSize);
215 EIGEN_DEVICE_FUNC EvaluatorPointerType data()
const {
return m_data; }
218 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void evalToBuf(EvaluatorPointerType data) {
219 const bool write_to_out = internal::is_same<OutputScalar, ComplexScalar>::value;
221 write_to_out ? (ComplexScalar*)data : (ComplexScalar*)m_device.allocate(sizeof(ComplexScalar) * m_size);
223 for (Index i = 0; i < m_size; ++i) {
224 buf[i] = MakeComplex<internal::is_same<InputScalar, RealScalar>::value>()(m_impl.coeff(i));
227 for (
size_t i = 0; i < m_fft.size(); ++i) {
228 Index dim = m_fft[i];
229 eigen_assert(dim >= 0 && dim < NumDims);
230 Index line_len = m_dimensions[dim];
231 eigen_assert(line_len >= 1);
232 ComplexScalar* line_buf = (ComplexScalar*)m_device.allocate(
sizeof(ComplexScalar) * line_len);
233 const bool is_power_of_two = isPowerOfTwo(line_len);
234 const Index good_composite = is_power_of_two ? 0 : findGoodComposite(line_len);
235 const Index log_len = is_power_of_two ? getLog2(line_len) : getLog2(good_composite);
238 is_power_of_two ? NULL : (ComplexScalar*)m_device.allocate(
sizeof(ComplexScalar) * good_composite);
240 is_power_of_two ? NULL : (ComplexScalar*)m_device.allocate(
sizeof(ComplexScalar) * good_composite);
241 ComplexScalar* pos_j_base_powered =
242 is_power_of_two ? NULL : (ComplexScalar*)m_device.allocate(
sizeof(ComplexScalar) * (line_len + 1));
243 if (!is_power_of_two) {
270 for (
int j = 0; j < line_len + 1; ++j) {
271 double arg = ((EIGEN_PI * j) * j) / line_len;
272 std::complex<double> tmp(numext::cos(
arg), numext::sin(
arg));
273 pos_j_base_powered[j] =
static_cast<ComplexScalar
>(tmp);
277 for (Index partial_index = 0; partial_index < m_size / line_len; ++partial_index) {
278 const Index base_offset = getBaseOffsetFromIndex(partial_index, dim);
281 const Index stride = m_strides[dim];
283 m_device.memcpy(line_buf, &buf[base_offset], line_len *
sizeof(ComplexScalar));
285 Index offset = base_offset;
286 for (
int j = 0; j < line_len; ++j, offset += stride) {
287 line_buf[j] = buf[offset];
292 if (is_power_of_two) {
293 processDataLineCooleyTukey(line_buf, line_len, log_len);
295 processDataLineBluestein(line_buf, line_len, good_composite, log_len, a, b, pos_j_base_powered);
299 if (FFTDir == FFT_FORWARD && stride == 1) {
300 m_device.memcpy(&buf[base_offset], line_buf, line_len *
sizeof(ComplexScalar));
302 Index offset = base_offset;
303 const ComplexScalar div_factor = ComplexScalar(1.0 / line_len, 0);
304 for (
int j = 0; j < line_len; ++j, offset += stride) {
305 buf[offset] = (FFTDir == FFT_FORWARD) ? line_buf[j] : line_buf[j] * div_factor;
309 m_device.deallocate(line_buf);
310 if (!is_power_of_two) {
311 m_device.deallocate(a);
312 m_device.deallocate(b);
313 m_device.deallocate(pos_j_base_powered);
318 for (Index i = 0; i < m_size; ++i) {
319 data[i] = PartOf<FFTResultType>()(buf[i]);
321 m_device.deallocate(buf);
325 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
static bool isPowerOfTwo(Index x) {
327 return !(x & (x - 1));
331 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
static Index findGoodComposite(Index n) {
333 while (i < 2 * n - 1) i *= 2;
337 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
static Index getLog2(Index m) {
339 while (m >>= 1) log2m++;
344 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void processDataLineCooleyTukey(ComplexScalar* line_buf, Index line_len,
346 eigen_assert(isPowerOfTwo(line_len));
347 scramble_FFT(line_buf, line_len);
348 compute_1D_Butterfly<FFTDir>(line_buf, line_len, log_len);
352 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void processDataLineBluestein(ComplexScalar* line_buf, Index line_len,
353 Index good_composite, Index log_len,
354 ComplexScalar* a, ComplexScalar* b,
355 const ComplexScalar* pos_j_base_powered) {
357 Index m = good_composite;
358 ComplexScalar* data = line_buf;
360 for (Index i = 0; i < n; ++i) {
361 if (FFTDir == FFT_FORWARD) {
362 a[i] = data[i] * numext::conj(pos_j_base_powered[i]);
364 a[i] = data[i] * pos_j_base_powered[i];
367 for (Index i = n; i < m; ++i) {
368 a[i] = ComplexScalar(0, 0);
371 for (Index i = 0; i < n; ++i) {
372 if (FFTDir == FFT_FORWARD) {
373 b[i] = pos_j_base_powered[i];
375 b[i] = numext::conj(pos_j_base_powered[i]);
378 for (Index i = n; i < m - n; ++i) {
379 b[i] = ComplexScalar(0, 0);
381 for (Index i = m - n; i < m; ++i) {
382 if (FFTDir == FFT_FORWARD) {
383 b[i] = pos_j_base_powered[m - i];
385 b[i] = numext::conj(pos_j_base_powered[m - i]);
390 compute_1D_Butterfly<FFT_FORWARD>(a, m, log_len);
393 compute_1D_Butterfly<FFT_FORWARD>(b, m, log_len);
395 for (Index i = 0; i < m; ++i) {
400 compute_1D_Butterfly<FFT_REVERSE>(a, m, log_len);
403 for (Index i = 0; i < m; ++i) {
407 for (Index i = 0; i < n; ++i) {
408 if (FFTDir == FFT_FORWARD) {
409 data[i] = a[i] * numext::conj(pos_j_base_powered[i]);
411 data[i] = a[i] * pos_j_base_powered[i];
416 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
static void scramble_FFT(ComplexScalar* data, Index n) {
417 eigen_assert(isPowerOfTwo(n));
419 for (Index i = 1; i < n; ++i) {
421 std::swap(data[j - 1], data[i - 1]);
424 while (m >= 2 && j > m) {
433 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void butterfly_2(ComplexScalar* data) {
434 ComplexScalar tmp = data[1];
435 data[1] = data[0] - data[1];
440 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void butterfly_4(ComplexScalar* data) {
441 ComplexScalar tmp[4];
442 tmp[0] = data[0] + data[1];
443 tmp[1] = data[0] - data[1];
444 tmp[2] = data[2] + data[3];
445 if (Dir == FFT_FORWARD) {
446 tmp[3] = ComplexScalar(0.0, -1.0) * (data[2] - data[3]);
448 tmp[3] = ComplexScalar(0.0, 1.0) * (data[2] - data[3]);
450 data[0] = tmp[0] + tmp[2];
451 data[1] = tmp[1] + tmp[3];
452 data[2] = tmp[0] - tmp[2];
453 data[3] = tmp[1] - tmp[3];
457 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void butterfly_8(ComplexScalar* data) {
458 ComplexScalar tmp_1[8];
459 ComplexScalar tmp_2[8];
461 tmp_1[0] = data[0] + data[1];
462 tmp_1[1] = data[0] - data[1];
463 tmp_1[2] = data[2] + data[3];
464 if (Dir == FFT_FORWARD) {
465 tmp_1[3] = (data[2] - data[3]) * ComplexScalar(0, -1);
467 tmp_1[3] = (data[2] - data[3]) * ComplexScalar(0, 1);
469 tmp_1[4] = data[4] + data[5];
470 tmp_1[5] = data[4] - data[5];
471 tmp_1[6] = data[6] + data[7];
472 if (Dir == FFT_FORWARD) {
473 tmp_1[7] = (data[6] - data[7]) * ComplexScalar(0, -1);
475 tmp_1[7] = (data[6] - data[7]) * ComplexScalar(0, 1);
477 tmp_2[0] = tmp_1[0] + tmp_1[2];
478 tmp_2[1] = tmp_1[1] + tmp_1[3];
479 tmp_2[2] = tmp_1[0] - tmp_1[2];
480 tmp_2[3] = tmp_1[1] - tmp_1[3];
481 tmp_2[4] = tmp_1[4] + tmp_1[6];
483#define SQRT2DIV2 0.7071067811865476
484 if (Dir == FFT_FORWARD) {
485 tmp_2[5] = (tmp_1[5] + tmp_1[7]) * ComplexScalar(SQRT2DIV2, -SQRT2DIV2);
486 tmp_2[6] = (tmp_1[4] - tmp_1[6]) * ComplexScalar(0, -1);
487 tmp_2[7] = (tmp_1[5] - tmp_1[7]) * ComplexScalar(-SQRT2DIV2, -SQRT2DIV2);
489 tmp_2[5] = (tmp_1[5] + tmp_1[7]) * ComplexScalar(SQRT2DIV2, SQRT2DIV2);
490 tmp_2[6] = (tmp_1[4] - tmp_1[6]) * ComplexScalar(0, 1);
491 tmp_2[7] = (tmp_1[5] - tmp_1[7]) * ComplexScalar(-SQRT2DIV2, SQRT2DIV2);
493 data[0] = tmp_2[0] + tmp_2[4];
494 data[1] = tmp_2[1] + tmp_2[5];
495 data[2] = tmp_2[2] + tmp_2[6];
496 data[3] = tmp_2[3] + tmp_2[7];
497 data[4] = tmp_2[0] - tmp_2[4];
498 data[5] = tmp_2[1] - tmp_2[5];
499 data[6] = tmp_2[2] - tmp_2[6];
500 data[7] = tmp_2[3] - tmp_2[7];
504 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void butterfly_1D_merge(ComplexScalar* data, Index n, Index n_power_of_2) {
508 const RealScalar wtemp = m_sin_PI_div_n_LUT[n_power_of_2];
509 const RealScalar wpi =
510 (Dir == FFT_FORWARD) ? m_minus_sin_2_PI_div_n_LUT[n_power_of_2] : -m_minus_sin_2_PI_div_n_LUT[n_power_of_2];
512 const ComplexScalar wp(wtemp, wpi);
513 const ComplexScalar wp_one = wp + ComplexScalar(1, 0);
514 const ComplexScalar wp_one_2 = wp_one * wp_one;
515 const ComplexScalar wp_one_3 = wp_one_2 * wp_one;
516 const ComplexScalar wp_one_4 = wp_one_3 * wp_one;
517 const Index n2 = n / 2;
518 ComplexScalar w(1.0, 0.0);
519 for (Index i = 0; i < n2; i += 4) {
520 ComplexScalar temp0(data[i + n2] * w);
521 ComplexScalar temp1(data[i + 1 + n2] * w * wp_one);
522 ComplexScalar temp2(data[i + 2 + n2] * w * wp_one_2);
523 ComplexScalar temp3(data[i + 3 + n2] * w * wp_one_3);
526 data[i + n2] = data[i] - temp0;
529 data[i + 1 + n2] = data[i + 1] - temp1;
530 data[i + 1] += temp1;
532 data[i + 2 + n2] = data[i + 2] - temp2;
533 data[i + 2] += temp2;
535 data[i + 3 + n2] = data[i + 3] - temp3;
536 data[i + 3] += temp3;
541 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void compute_1D_Butterfly(ComplexScalar* data, Index n, Index n_power_of_2) {
542 eigen_assert(isPowerOfTwo(n));
544 compute_1D_Butterfly<Dir>(data, n / 2, n_power_of_2 - 1);
545 compute_1D_Butterfly<Dir>(data + n / 2, n / 2, n_power_of_2 - 1);
546 butterfly_1D_merge<Dir>(data, n, n_power_of_2);
548 butterfly_8<Dir>(data);
550 butterfly_4<Dir>(data);
552 butterfly_2<Dir>(data);
556 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index getBaseOffsetFromIndex(Index index, Index omitted_dim)
const {
559 if (
static_cast<int>(Layout) ==
static_cast<int>(
ColMajor)) {
560 for (
int i = NumDims - 1; i > omitted_dim; --i) {
561 const Index partial_m_stride = m_strides[i] / m_dimensions[omitted_dim];
562 const Index idx = index / partial_m_stride;
563 index -= idx * partial_m_stride;
564 result += idx * m_strides[i];
568 for (Index i = 0; i < omitted_dim; ++i) {
569 const Index partial_m_stride = m_strides[i] / m_dimensions[omitted_dim];
570 const Index idx = index / partial_m_stride;
571 index -= idx * partial_m_stride;
572 result += idx * m_strides[i];
580 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index getIndexFromOffset(Index base, Index omitted_dim, Index offset)
const {
581 Index result = base + offset * m_strides[omitted_dim];
587 const FFT EIGEN_DEVICE_REF m_fft;
588 Dimensions m_dimensions;
589 array<Index, NumDims> m_strides;
590 TensorEvaluator<ArgType, Device> m_impl;
591 EvaluatorPointerType m_data;
592 const Device EIGEN_DEVICE_REF m_device;
596 const RealScalar m_sin_PI_div_n_LUT[32] = {RealScalar(0.0),
598 RealScalar(-0.999999999999999),
599 RealScalar(-0.292893218813453),
600 RealScalar(-0.0761204674887130),
601 RealScalar(-0.0192147195967696),
602 RealScalar(-0.00481527332780311),
603 RealScalar(-0.00120454379482761),
604 RealScalar(-3.01181303795779e-04),
605 RealScalar(-7.52981608554592e-05),
606 RealScalar(-1.88247173988574e-05),
607 RealScalar(-4.70619042382852e-06),
608 RealScalar(-1.17654829809007e-06),
609 RealScalar(-2.94137117780840e-07),
610 RealScalar(-7.35342821488550e-08),
611 RealScalar(-1.83835707061916e-08),
612 RealScalar(-4.59589268710903e-09),
613 RealScalar(-1.14897317243732e-09),
614 RealScalar(-2.87243293150586e-10),
615 RealScalar(-7.18108232902250e-11),
616 RealScalar(-1.79527058227174e-11),
617 RealScalar(-4.48817645568941e-12),
618 RealScalar(-1.12204411392298e-12),
619 RealScalar(-2.80511028480785e-13),
620 RealScalar(-7.01277571201985e-14),
621 RealScalar(-1.75319392800498e-14),
622 RealScalar(-4.38298482001247e-15),
623 RealScalar(-1.09574620500312e-15),
624 RealScalar(-2.73936551250781e-16),
625 RealScalar(-6.84841378126949e-17),
626 RealScalar(-1.71210344531737e-17),
627 RealScalar(-4.28025861329343e-18)};
630 const RealScalar m_minus_sin_2_PI_div_n_LUT[32] = {RealScalar(0.0),
632 RealScalar(-1.00000000000000e+00),
633 RealScalar(-7.07106781186547e-01),
634 RealScalar(-3.82683432365090e-01),
635 RealScalar(-1.95090322016128e-01),
636 RealScalar(-9.80171403295606e-02),
637 RealScalar(-4.90676743274180e-02),
638 RealScalar(-2.45412285229123e-02),
639 RealScalar(-1.22715382857199e-02),
640 RealScalar(-6.13588464915448e-03),
641 RealScalar(-3.06795676296598e-03),
642 RealScalar(-1.53398018628477e-03),
643 RealScalar(-7.66990318742704e-04),
644 RealScalar(-3.83495187571396e-04),
645 RealScalar(-1.91747597310703e-04),
646 RealScalar(-9.58737990959773e-05),
647 RealScalar(-4.79368996030669e-05),
648 RealScalar(-2.39684498084182e-05),
649 RealScalar(-1.19842249050697e-05),
650 RealScalar(-5.99211245264243e-06),
651 RealScalar(-2.99605622633466e-06),
652 RealScalar(-1.49802811316901e-06),
653 RealScalar(-7.49014056584716e-07),
654 RealScalar(-3.74507028292384e-07),
655 RealScalar(-1.87253514146195e-07),
656 RealScalar(-9.36267570730981e-08),
657 RealScalar(-4.68133785365491e-08),
658 RealScalar(-2.34066892682746e-08),
659 RealScalar(-1.17033446341373e-08),
660 RealScalar(-5.85167231706864e-09),
661 RealScalar(-2.92583615853432e-09)};
The tensor base class.
Definition TensorForwardDeclarations.h:68
Tensor FFT class.
Definition TensorFFT.h:101
Namespace containing all symbols from the Eigen library.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_arg_op< typename Derived::Scalar >, const Derived > arg(const Eigen::ArrayBase< Derived > &x)
The tensor evaluator class.
Definition TensorEvaluator.h:30