mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Block evaluation for TensorGeneratorOp
This commit is contained in:
@@ -42,11 +42,11 @@ struct Generator2D {
|
||||
template <int DataLayout>
|
||||
static void test_2D()
|
||||
{
|
||||
Tensor<float, 2> matrix(5, 7);
|
||||
Tensor<float, 2> matrix(512, 512);
|
||||
Tensor<float, 2> result = matrix.generate(Generator2D());
|
||||
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
for (int j = 0; j < 5; ++j) {
|
||||
for (int i = 0; i < 512; ++i) {
|
||||
for (int j = 0; j < 512; ++j) {
|
||||
VERIFY_IS_EQUAL(result(i, j), 3*i + 11*j);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user