12 #include <Eigen/CXX11/Tensor> 17 template <
int DataLayout>
46 template <
int DataLayout>
58 result = input.convolve(kernel, dims);
61 input(1,0)*kernel(1,0) + input(1,1)*kernel(1,1));
63 input(1,1)*kernel(1,0) + input(1,2)*kernel(1,1));
65 input(2,0)*kernel(1,0) + input(2,1)*kernel(1,1));
67 input(2,1)*kernel(1,0) + input(2,2)*kernel(1,1));
70 template <
int DataLayout>
87 padding[0] = std::make_pair(0, 0);
89 valid = input.pad(padding).convolve(kernel, dims);
95 padding[0] = std::make_pair(1, 1);
97 same = input.pad(padding).convolve(kernel, dims);
105 padding[0] = std::make_pair(2, 2);
107 full = input.pad(padding).convolve(kernel, dims);
116 template <
int DataLayout>
131 result = input.
stride(stride_of_3).convolve(kernel, dims).stride(stride_of_2);
135 input(6)*kernel(2)));
137 input(12)*kernel(2)));
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 const TensorStridingOp< const Strides, const Tensor< Scalar_, NumIndices_, Options_, IndexType_ > > stride(const Strides &strides) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar * data()
#define CALL_SUBTEST(FUNC)
EIGEN_DECLARE_TEST(cxx11_tensor_convolution)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index dimension(std::size_t n) const
internal::nested_eval< T, 1 >::type eval(const T &xpr)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor< Scalar_, NumIndices_, Options_, IndexType_ > & setZero()