12 #include <Eigen/CXX11/Tensor> 17 template <
int DataLayout>
45 template <
int DataLayout>
57 result = input.convolve(kernel, dims);
60 input(1,0)*kernel(1,0) + input(1,1)*kernel(1,1));
62 input(1,1)*kernel(1,0) + input(1,2)*kernel(1,1));
64 input(2,0)*kernel(1,0) + input(2,1)*kernel(1,1));
66 input(2,1)*kernel(1,0) + input(2,2)*kernel(1,1));
69 template <
int DataLayout>
86 padding[0] = std::make_pair(0, 0);
88 valid = input.pad(padding).convolve(kernel, dims);
94 padding[0] = std::make_pair(1, 1);
96 same = input.pad(padding).convolve(kernel, dims);
104 padding[0] = std::make_pair(2, 2);
106 full = input.pad(padding).convolve(kernel, dims);
115 template <
int DataLayout>
130 result = input.
stride(stride_of_3).convolve(kernel, dims).stride(stride_of_2);
134 input(6)*kernel(2)));
136 input(12)*kernel(2)));
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index dimension(std::size_t n) const
void test_cxx11_tensor_convolution()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor< Scalar_, NumIndices_, Options_, IndexType_ > & setRandom()
A cost model used to limit the number of threads used for evaluating tensor expression.
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
#define VERIFY_IS_APPROX(a, b)
#define VERIFY_IS_EQUAL(a, b)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
static void test_strides()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar * data()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorStridingOp< const Strides, const Tensor< Scalar_, NumIndices_, Options_, IndexType_ > > stride(const Strides &strides) const
#define CALL_SUBTEST(FUNC)
internal::nested_eval< T, 1 >::type eval(const T &xpr)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor< Scalar_, NumIndices_, Options_, IndexType_ > & setZero()