12 #include <Eigen/CXX11/Tensor> 16 template<
int DataLayout>
29 no_patch = tensor.extract_patches(patch_dims);
45 for (
int i = 0;
i < tensor.
size(); ++
i) {
54 single_patch = tensor.extract_patches(patch_dims);
70 for (
int i = 0;
i < tensor.
size(); ++
i) {
79 twod_patch = tensor.extract_patches(patch_dims);
95 for (
int i = 0;
i < 2; ++
i) {
96 for (
int j = 0;
j < 2; ++
j) {
97 for (
int k = 0; k < 4; ++k) {
98 for (
int l = 0;
l < 7; ++
l) {
101 patch_loc =
i + 2 * (
j + 2 * (k + 4 *
l));
103 patch_loc =
l + 7 * (k + 4 * (
j + 2 *
i));
105 for (
int x = 0;
x < 2; ++
x) {
106 for (
int y = 0;
y < 2; ++
y) {
124 threed_patch = tensor.extract_patches(patch_dims);
140 for (
int i = 0;
i < 2; ++
i) {
141 for (
int j = 0;
j < 2; ++
j) {
142 for (
int k = 0; k < 3; ++k) {
143 for (
int l = 0;
l < 3; ++
l) {
146 patch_loc =
i + 2 * (
j + 2 * (k + 3 *
l));
148 patch_loc =
l + 3 * (k + 3 * (
j + 2 *
i));
150 for (
int x = 0;
x < 2; ++
x) {
151 for (
int y = 0;
y < 3; ++
y) {
152 for (
int z = 0;
z < 5; ++
z) {
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index size() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor< Scalar_, NumIndices_, Options_, IndexType_ > & setRandom()
static void test_simple_patch()
static const Line3 l(Rot3(), 1, 1)
#define VERIFY_IS_EQUAL(a, b)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar * data()
#define CALL_SUBTEST(FUNC)
EIGEN_DECLARE_TEST(cxx11_tensor_patch)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index dimension(std::size_t n) const
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
static const int DataLayout