Compile-time block-tensor unittests.
More...
#include <iganet/iganet.h>
#include <iostream>
#include <gtest/gtest.h>
|
| #define | test_binary_op(op, A, B, ...) |
| |
| #define | test_binary_special_op(op, A, B, ...) |
| |
| #define | test_ternary_op(op, A, B, C, ...) |
| |
| #define | test_ternary_special_op(op, A, B, C, ...) |
| |
| #define | test_unary_op(op, A, ...) |
| |
| #define | test_unary_special_op(op, A, ...) |
| |
|
| int | main (int argc, char **argv) |
| |
| | TEST (BlockTensor, BlockTensor) |
| |
| | TEST (BlockTensor, BlockTensor_ops) |
| |
| | TEST (BlockTensor, DeterminantTraceNormNormalizeAndDot) |
| |
| | TEST (BlockTensor, GeneralizedInverseAndCompoundScalarOperators) |
| |
| | TEST (BlockTensor, MetadataStorageAndFormatting) |
| |
| | TEST (BlockTensor, NumericScalarMultiplicationOnBothSides) |
| |
| | TEST (BlockTensor, RankThreeIndexSliceReorderAndMultiplication) |
| |
| | TEST (BlockTensorDeathTest, RejectsOutOfRangeIndicesAndSlices) |
| |
| | TEST (BlockTensorProperties, GeneralizedInverseSatisfiesReconstruction) |
| |
| | TEST (BlockTensorProperties, InverseProductApproximatesIdentity) |
| |
| | TEST (BlockTensorProperties, ReorderFollowedByInverseRestoresRankThreeTensor) |
| |
Compile-time block-tensor unittests.
- Author
- Matthias Moller
- Copyright
- This file is part of the IgANet project
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
◆ test_binary_op
| #define test_binary_op |
( |
|
op, |
|
|
|
A, |
|
|
|
B, |
|
|
|
... |
|
) |
| |
Value: EXPECT_TRUE(torch::equal(iganet::utils::op((A), (B), ##__VA_ARGS__)(0, 0), \
torch::op((A)(0, 0), (B)(0, 0), ##__VA_ARGS__)))
◆ test_binary_special_op
| #define test_binary_special_op |
( |
|
op, |
|
|
|
A, |
|
|
|
B, |
|
|
|
... |
|
) |
| |
Value: EXPECT_TRUE( \
torch::equal(iganet::utils::op((A), (B), ##__VA_ARGS__)(0, 0), \
torch::special::op((A)(0, 0), (B)(0, 0), ##__VA_ARGS__)))
◆ test_ternary_op
| #define test_ternary_op |
( |
|
op, |
|
|
|
A, |
|
|
|
B, |
|
|
|
C, |
|
|
|
... |
|
) |
| |
Value: EXPECT_TRUE( \
torch::equal(iganet::utils::op((A), (B), (C), ##__VA_ARGS__)(0, 0), \
torch::op((A)(0, 0), (B)(0, 0), (C)(0, 0), ##__VA_ARGS__)))
◆ test_ternary_special_op
| #define test_ternary_special_op |
( |
|
op, |
|
|
|
A, |
|
|
|
B, |
|
|
|
C, |
|
|
|
... |
|
) |
| |
Value: EXPECT_TRUE(torch::equal( \
iganet::utils::op((A), (B), (C), ##__VA_ARGS__)(0, 0), \
torch::special::op((A)(0, 0), (B)(0, 0), (C)(0, 0), ##__VA_ARGS__)))
◆ test_unary_op
| #define test_unary_op |
( |
|
op, |
|
|
|
A, |
|
|
|
... |
|
) |
| |
Value: EXPECT_TRUE(torch::equal(iganet::utils::op((A), ##__VA_ARGS__)(0, 0), \
torch::op((A)(0, 0), ##__VA_ARGS__)))
◆ test_unary_special_op
| #define test_unary_special_op |
( |
|
op, |
|
|
|
A, |
|
|
|
... |
|
) |
| |
Value: EXPECT_TRUE(torch::equal(iganet::utils::op((A), ##__VA_ARGS__)(0, 0), \
torch::special::op((A)(0, 0), ##__VA_ARGS__)))
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
◆ TEST() [1/11]
| TEST |
( |
BlockTensor |
, |
|
|
BlockTensor |
|
|
) |
| |
◆ TEST() [2/11]
| TEST |
( |
BlockTensor |
, |
|
|
BlockTensor_ops |
|
|
) |
| |
◆ TEST() [3/11]
| TEST |
( |
BlockTensor |
, |
|
|
DeterminantTraceNormNormalizeAndDot |
|
|
) |
| |
◆ TEST() [4/11]
| TEST |
( |
BlockTensor |
, |
|
|
GeneralizedInverseAndCompoundScalarOperators |
|
|
) |
| |
◆ TEST() [5/11]
| TEST |
( |
BlockTensor |
, |
|
|
MetadataStorageAndFormatting |
|
|
) |
| |
◆ TEST() [6/11]
| TEST |
( |
BlockTensor |
, |
|
|
NumericScalarMultiplicationOnBothSides |
|
|
) |
| |
◆ TEST() [7/11]
| TEST |
( |
BlockTensor |
, |
|
|
RankThreeIndexSliceReorderAndMultiplication |
|
|
) |
| |
◆ TEST() [8/11]
| TEST |
( |
BlockTensorDeathTest |
, |
|
|
RejectsOutOfRangeIndicesAndSlices |
|
|
) |
| |
◆ TEST() [9/11]
| TEST |
( |
BlockTensorProperties |
, |
|
|
GeneralizedInverseSatisfiesReconstruction |
|
|
) |
| |
◆ TEST() [10/11]
| TEST |
( |
BlockTensorProperties |
, |
|
|
InverseProductApproximatesIdentity |
|
|
) |
| |
◆ TEST() [11/11]
| TEST |
( |
BlockTensorProperties |
, |
|
|
ReorderFollowedByInverseRestoresRankThreeTensor |
|
|
) |
| |