v0.14.0
Loading...
Searching...
No Matches
Tensor1_divide_generic.hpp
Go to the documentation of this file.
1/* Divides a Tensor1 by a generic, yielding a Tensor1. Usually used
2 for doubles, but could be used for complex, etc. All that it
3 requires is that you can add an element of the Tensor1 to it. */
4
5/* A(i) / d0 -> Tensor1 */
6
7#pragma once
8
9namespace FTensor
10{
11 template <class A, class T, class U, int Dim, char i>
13 {
15 U d;
16
17 public:
18 typename promote<T, U>::V operator()(const int N) const
19 {
20 return iterA(N) / d;
21 }
22
24 : iterA(a), d(d0)
25 {}
26 };
27
28 template <class A, class T, class U, int Dim, char i>
30 typename promote<T, U>::V, Dim, i>
32 {
35 TensorExpr(a, d0));
36 }
37}
constexpr double a
Tensor1_Expr< A, T, Dim, i > iterA
Tensor1_divide_generic(const Tensor1_Expr< A, T, Dim, i > &a, const U &d0)
promote< T, U >::V operator()(const int N) const
FTensor::Index< 'i', SPACE_DIM > i
Tensors class implemented by Walter Landry.
Definition FTensor.hpp:51
auto operator/(const Ddg_Expr< A, T, Dim01, Dim23, i, j, k, l > &a, const U &d0)
const int N
Definition speed_test.cpp:3