mirror of
https://github.com/amd/blis.git
synced 2026-04-20 07:38:53 +00:00
GTestSuite: BLAS2 test case selection
Various changes to BLAS2 test cases:
- GEMV: Reduce number of tests to make runtime more reasonable.
- TRSV:
- Standardize tests across different data types, including
adding memory testing for all variants.
- Improve scaling when making matrix A diagonally dominant and
avoid singular matrix when BLIS_INT_ELEMENT_TYPE is used.
- TRMV: Copy TRSV generic tests.
- Expand set of tests for HEMV, HER, HER2, SYMV, SYR, SYR2 and
make lda contribution to test names consistent with others
routines.
- Various adjustments to thresholds added.
Update gtestsuite documentation to describe using GTEST_FILTER
environment variable to select tests to run or exclude. This
works particularly well when using ctest, as we do not enumerate
all the tests at this level and so need to pass the selection
down to the individual executables.
AMD-Internal: [CPUPL-4500]
Change-Id: Ifcb6410455b7f91e58b555f94b9fd7920d7ad9d9
This commit is contained in:
@@ -212,6 +212,13 @@ $ ./testsuite.level1.addv
|
||||
```console
|
||||
$ ./testuite.util.nrm2 --gtest_filter="*snrm2*"
|
||||
```
|
||||
Alternatively, use the GTEST_FILTER environment variable. This is particularly useful for
|
||||
passing gtest filter options to executables run via ctest, e.g.:
|
||||
```console
|
||||
$ GTEST_FILTER="*snrm2*" ./testuite.util.nrm2
|
||||
$ GTEST_FILTER=-"EVT" ctest -R level2
|
||||
```
|
||||
|
||||
## Running tests using Valgrind
|
||||
We can run any executable using valgrind as usual. For example, use the following command
|
||||
```console
|
||||
|
||||
@@ -105,31 +105,9 @@ TEST_P( cgemvGeneric, API )
|
||||
test_gemv<T>( storage, transa, conjx, m, n, alpha, lda_inc, incx, beta, incy, thresh, is_memory_test );
|
||||
}
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
cgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c','t'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // m
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(T{1.0, -2.0}), // alpha
|
||||
::testing::Values(T{-1.0, 1.0}), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Tiny_Matixsizes,
|
||||
BlackboxSmall,
|
||||
cgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -137,22 +115,24 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(1), gtint_t(9), 1), // m
|
||||
::testing::Range(gtint_t(1), gtint_t(9), 1), // n
|
||||
::testing::Values(T{1.0 , 2.0}), // alpha
|
||||
::testing::Values(T{-1.0, -1.0}), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0)), // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1), gtint_t(20), 1), // m
|
||||
::testing::Range(gtint_t(1), gtint_t(20), 1), // n
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // alpha
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(3), gtint_t(-1)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(5), gtint_t(-2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(7)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Average_Matrixsizes,
|
||||
BlackboxMedium,
|
||||
cgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -160,23 +140,35 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(128), gtint_t(512), 7), // m
|
||||
::testing::Range(gtint_t(512), gtint_t(128), -7), // n
|
||||
::testing::Values(T{-1.0, -2.0}), // alpha
|
||||
::testing::Values(T{-2.0, 1.0}), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(1)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // m
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // alpha
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(3), gtint_t(-1)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(5), gtint_t(-1)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(7)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
|
||||
#if 1
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Large_Matrixsizes,
|
||||
Blackbox_Large,
|
||||
cgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -184,23 +176,24 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c', 't'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(1024), gtint_t(32767), 1023), // m
|
||||
::testing::Range(gtint_t(1024), gtint_t(32767), 1023), // n
|
||||
::testing::Values(T{1.0, 1.0}), // alpha
|
||||
::testing::Values(T{1.0, 1.0}), // beta
|
||||
::testing::Values(gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(4)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(2127)), // m
|
||||
::testing::Values(gtint_t(2127)), // n
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // alpha
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(57)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
|
||||
::gemvGenericPrint<T>()
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Large_Scalar_Stride,
|
||||
Blackbox_LargeM,
|
||||
cgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -208,23 +201,25 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(50), 10), // m
|
||||
::testing::Range(gtint_t(10), gtint_t(50), 10), // n
|
||||
::testing::Values(T{3.0, -3.0}), // alpha
|
||||
::testing::Values(T{-3.0, 4.0}), // beta
|
||||
::testing::Values(gtint_t(10)), // stride size for x
|
||||
::testing::Values(gtint_t(10)), // stride size for y
|
||||
::testing::Values(gtint_t(1)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(5099)), // m
|
||||
::testing::Values(gtint_t(1), gtint_t(2), gtint_t(17),
|
||||
gtint_t(173)), // n
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // alpha
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(57)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Nonunit_Incx,
|
||||
Blackbox_LargeN,
|
||||
cgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -232,63 +227,20 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(50), 10), // m
|
||||
::testing::Range(gtint_t(0), gtint_t(0), 0), // n
|
||||
::testing::Values(T{-1.0, -2.0}), // alpha
|
||||
::testing::Values(T{1.0, 2.0}), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(5)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(1), gtint_t(2), gtint_t(17),
|
||||
gtint_t(173)), // m
|
||||
::testing::Values(gtint_t(5099)), // n
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // alpha
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(57)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Unit_MN,
|
||||
cgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(1)), // m
|
||||
::testing::Values(gtint_t(1)), // n
|
||||
::testing::Values(T{-1.0, -2.0}, T{2.0, -1.0}), // alpha
|
||||
::testing::Values(T{1.0, 2.0}), // beta
|
||||
::testing::Values(gtint_t(7)), // stride size for x
|
||||
::testing::Values(gtint_t(13)), // stride size for y
|
||||
::testing::Values(gtint_t(57), gtint_t(119)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
More_Scalar,
|
||||
cgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(1)), // m
|
||||
::testing::Values(gtint_t(1)), // n
|
||||
::testing::Values(T{-1.0, -2.0}), // alpha
|
||||
::testing::Values(T{1.0, 2.0}, T{-2.0, 1.0},
|
||||
T{-3.0, 2.0}, T{-1.0, -2.0}), // beta
|
||||
::testing::Values(gtint_t(7)), // stride size for x
|
||||
::testing::Values(gtint_t(13)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(190)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
@@ -106,53 +106,7 @@ TEST_P( dgemvGeneric, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
dgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','t'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // m
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values( 1.0 ), // alpha
|
||||
::testing::Values(-1.0 ), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Tiny_Matrixsizes,
|
||||
dgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(1), gtint_t(8), 1), // m
|
||||
::testing::Range(gtint_t(1), gtint_t(8), 1), // n
|
||||
::testing::Values( -1.2, 0.0, 1.0 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, 2.1 ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(3)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(5)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(7)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Average_Matrixsizes,
|
||||
BlackboxSmall,
|
||||
dgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -160,22 +114,22 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('c','t'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(128), gtint_t(512), 31), // m
|
||||
::testing::Range(gtint_t(512), gtint_t(128), -31), // n
|
||||
::testing::Values(-1.0, 2.2 ), // alpha
|
||||
::testing::Values(-1.0, -3.1 ), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(2)), // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1), gtint_t(20), 1), // m
|
||||
::testing::Range(gtint_t(1), gtint_t(20), 1), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, -1.2 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.1 ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(3), gtint_t(-1)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(5), gtint_t(-2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(7)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Large_Matrixsizes,
|
||||
BlackboxMedium,
|
||||
dgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -183,23 +137,33 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','t'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(1024), gtint_t(32767), 1023), // m
|
||||
::testing::Range(gtint_t(1024), gtint_t(32767), 1023), // n
|
||||
::testing::Values(1.0), // alpha
|
||||
::testing::Values(1.0), // beta
|
||||
::testing::Values(gtint_t(11), gtint_t(119), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(211), gtint_t(119), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(1), gtint_t(252)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // m
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, -1.2 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.1 ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(3), gtint_t(-1)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(5), gtint_t(-1)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(7)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
|
||||
::gemvGenericPrint<T>()
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
#if 1
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Unit_MN,
|
||||
Blackbox_Large,
|
||||
dgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -207,16 +171,65 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c','t'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(1)), // m
|
||||
::testing::Values(gtint_t(1)), // n
|
||||
::testing::Values(1.0, 2.0), // alpha
|
||||
::testing::Values(1.0, -1.2), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(1)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(2127)), // m
|
||||
::testing::Values(gtint_t(2127)), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, -1.2 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.1 ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(57)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_LargeM,
|
||||
dgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(5099)), // m
|
||||
::testing::Values(gtint_t(1), gtint_t(2), gtint_t(17),
|
||||
gtint_t(173)), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, -1.2 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.1 ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(57)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_LargeN,
|
||||
dgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(1), gtint_t(2), gtint_t(17),
|
||||
gtint_t(173)), // m
|
||||
::testing::Values(gtint_t(5099)), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, -1.2 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.1 ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(57)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
#endif
|
||||
|
||||
@@ -104,32 +104,10 @@ TEST_P( sgemvGeneric, API )
|
||||
test_gemv<T>( storage, transa, conjx, m, n, alpha, lda_inc, incx, beta, incy, thresh, is_memory_test );
|
||||
}
|
||||
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
sgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','t'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // m
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values( 1.0 ), // alpha
|
||||
::testing::Values(-1.0 ), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Tiny_Matrixsizes,
|
||||
BlackboxSmall,
|
||||
sgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -137,22 +115,22 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(1), gtint_t(9), 1), // m
|
||||
::testing::Range(gtint_t(1), gtint_t(9), 1), // n
|
||||
::testing::Values( 1.0 ), // alpha
|
||||
::testing::Values(-1.0 ), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(7), gtint_t(3)), // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1), gtint_t(20), 1), // m
|
||||
::testing::Range(gtint_t(1), gtint_t(20), 1), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, -1.2 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.1 ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(3), gtint_t(-1)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(5), gtint_t(-2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(7)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Average_Matrixsizes,
|
||||
BlackboxMedium,
|
||||
sgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -160,22 +138,33 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('c','t'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(128), gtint_t(512), 31), // m
|
||||
::testing::Range(gtint_t(512), gtint_t(128), -31), // n
|
||||
::testing::Values(-1.0, 2.2 ), // alpha
|
||||
::testing::Values(-1.0, -3.1 ), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(1)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // m
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, -1.2 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.1 ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(3), gtint_t(-1)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(5), gtint_t(-1)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(7)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
#if 1
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Large_Matrixsizes,
|
||||
Blackbox_Large,
|
||||
sgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -183,22 +172,22 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','t'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(1024), gtint_t(32767), 1023), // m
|
||||
::testing::Range(gtint_t(1024), gtint_t(32767), 1023), // n
|
||||
::testing::Values(1.0), // alpha
|
||||
::testing::Values(1.0), // beta
|
||||
::testing::Values(gtint_t(11), gtint_t(119), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(211), gtint_t(119), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(1), gtint_t(252)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(2127)), // m
|
||||
::testing::Values(gtint_t(2127)), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, -1.2 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.1 ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(57)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Unit_MN,
|
||||
Blackbox_LargeM,
|
||||
sgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -206,16 +195,42 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c','t'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(1)), // m
|
||||
::testing::Values(gtint_t(1)), // n
|
||||
::testing::Values(1.0, 2.0), // alpha
|
||||
::testing::Values(1.0, -1.1), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(5099)), // m
|
||||
::testing::Values(gtint_t(1), gtint_t(2), gtint_t(17),
|
||||
gtint_t(173)), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, -1.2 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.1 ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(57)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_LargeN,
|
||||
sgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(1), gtint_t(2), gtint_t(17),
|
||||
gtint_t(173)), // m
|
||||
::testing::Values(gtint_t(5099)), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, -1.2 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.1 ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(57)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
#endif
|
||||
|
||||
@@ -85,6 +85,7 @@ TEST_P( zgemvGeneric, API )
|
||||
// Check gtestsuite gemv.h or netlib source code for reminder of the
|
||||
// functionality from which we estimate operation count per element
|
||||
// of output, and hence the multipler for epsilon.
|
||||
// No adjustment applied yet for complex data.
|
||||
double thresh;
|
||||
if (m == 0 || n == 0)
|
||||
thresh = 0.0;
|
||||
@@ -106,30 +107,7 @@ TEST_P( zgemvGeneric, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
zgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c','t'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // m
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(T{1.0, 1.0}, T{0.0, 0.0}, T{1.0, -2.0}), // alpha
|
||||
::testing::Values(T{1.0, 1.0}, T{0.0, 0.0}, T{-1.0, 1.0}), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Tiny_Matrixsizes,
|
||||
BlackboxSmall,
|
||||
zgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -137,45 +115,24 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(1), gtint_t(9), 1), // m
|
||||
::testing::Range(gtint_t(1), gtint_t(9), 1), // n
|
||||
::testing::Values(T{1.0, 1.0}, T{0.0, 0.0}, T{1.0, -2.0}), // alpha
|
||||
::testing::Values(T{1.0, 1.0}, T{0.0, 0.0}, T{1.0, -2.0}), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(7), gtint_t(3)), // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1), gtint_t(20), 1), // m
|
||||
::testing::Range(gtint_t(1), gtint_t(20), 1), // n
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // alpha
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(3), gtint_t(-1)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(5), gtint_t(-2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(7)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Average_Matrixsizes,
|
||||
zgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('t','c'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(128), gtint_t(512), 31), // m
|
||||
::testing::Range(gtint_t(512), gtint_t(128), -31), // n
|
||||
::testing::Values(T{1.0, 1.0}, T{0.0, 0.0}, T{-1.0, 2.0}, T{-2.0, 1.0}), // alpha
|
||||
::testing::Values(T{1.0, 1.0}, T{0.0, 0.0}, T{-1.0, -3.1}), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(1)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Large_Matrixsizes,
|
||||
BlackboxMedium,
|
||||
zgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -183,23 +140,35 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','t'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(1024), gtint_t(32767), 1023), // m
|
||||
::testing::Range(gtint_t(1024), gtint_t(32767), 1023), // n
|
||||
::testing::Values(T{1.0, 1.0}, T{0.0, 0.0}, T{1.1, 2.1}), // alpha
|
||||
::testing::Values(T{1.0, 1.0}, T{0.0, 0.0}, T{1.1, 2.1}), // beta
|
||||
::testing::Values(gtint_t(11), gtint_t(119), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(211), gtint_t(119), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(1), gtint_t(252)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // m
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // alpha
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(3), gtint_t(-1)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(5), gtint_t(-1)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(7)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
|
||||
::gemvGenericPrint<T>()
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
#if 1
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_Unit_MN,
|
||||
Blackbox_Large,
|
||||
zgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -207,17 +176,71 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n','c','t'), // transa
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(1)), // m
|
||||
::testing::Values(gtint_t(1)), // n
|
||||
::testing::Values(T{1.0, 1.0}, T{0.0, 0.0}, T{1.0, -0.1}), // alpha
|
||||
::testing::Values(T{1.0, 1.0}, T{0.0, 0.0}, T{0.1, 1.0},
|
||||
T{-2.0, 1.0}, T{-3.0, 2.0}, T{-1.0, -2.0}), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(2127)), // m
|
||||
::testing::Values(gtint_t(2127)), // n
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // alpha
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(57)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_LargeM,
|
||||
zgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(5099)), // m
|
||||
::testing::Values(gtint_t(1), gtint_t(2), gtint_t(17),
|
||||
gtint_t(173)), // n
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // alpha
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(57)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox_LargeN,
|
||||
zgemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('n', 'c', 't'), // transa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(1), gtint_t(2), gtint_t(17),
|
||||
gtint_t(173)), // m
|
||||
::testing::Values(gtint_t(5099)), // n
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // alpha
|
||||
::testing::Values(T{0.0, 0.0}, T{1.0, 0.0}, T{-1.0, 0.0},
|
||||
T{1.1, -2.0} ), // beta
|
||||
::testing::Values(gtint_t(1), gtint_t(211)), // stride size for x
|
||||
::testing::Values(gtint_t(1), gtint_t(11)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(57)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is_memory_test
|
||||
),
|
||||
::gemvGenericPrint<T>()
|
||||
);
|
||||
#endif
|
||||
|
||||
@@ -118,7 +118,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(0) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<scomplex>()
|
||||
);
|
||||
@@ -153,7 +153,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(1) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<scomplex>()
|
||||
);
|
||||
@@ -185,7 +185,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(3) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(5) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<scomplex>()
|
||||
);
|
||||
@@ -219,7 +219,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(-3) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(0) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<scomplex>()
|
||||
);
|
||||
@@ -251,7 +251,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(3) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(2) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<scomplex>()
|
||||
);
|
||||
@@ -282,7 +282,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(3), gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(2) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<scomplex>()
|
||||
);
|
||||
|
||||
@@ -116,7 +116,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(0) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<double>()
|
||||
);
|
||||
@@ -146,7 +146,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(1) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<double>()
|
||||
);
|
||||
@@ -178,7 +178,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(3) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(5) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<double>()
|
||||
);
|
||||
@@ -212,7 +212,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(-3) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(0) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<double>()
|
||||
);
|
||||
@@ -244,7 +244,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(2) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<double>()
|
||||
);
|
||||
@@ -275,7 +275,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(4),gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(2) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<double>()
|
||||
);
|
||||
|
||||
@@ -116,7 +116,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(0) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<float>()
|
||||
);
|
||||
@@ -151,7 +151,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(1) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<float>()
|
||||
);
|
||||
@@ -183,7 +183,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(3) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(5) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<float>()
|
||||
);
|
||||
@@ -217,7 +217,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(-3) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(0) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<float>()
|
||||
);
|
||||
@@ -279,7 +279,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(3), gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(1) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<float>()
|
||||
);
|
||||
|
||||
@@ -116,7 +116,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(0) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<dcomplex>()
|
||||
);
|
||||
@@ -151,7 +151,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(1) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<dcomplex>()
|
||||
);
|
||||
@@ -183,7 +183,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(3) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(5) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<dcomplex>()
|
||||
);
|
||||
@@ -217,7 +217,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(-3) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(0) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<dcomplex>()
|
||||
);
|
||||
@@ -249,7 +249,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(3) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(1) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<dcomplex>()
|
||||
);
|
||||
@@ -279,7 +279,7 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
// incy: stride of y vector.
|
||||
::testing::Values( gtint_t(4), gtint_t(1) ),
|
||||
// inc_lda: increment to the leading dim of a
|
||||
::testing::Values( gtint_t(1) )
|
||||
::testing::Values( gtint_t(0), gtint_t(3) )
|
||||
),
|
||||
::gerGenericPrint<dcomplex>()
|
||||
);
|
||||
|
||||
@@ -90,7 +90,7 @@ TEST_P( chemvGeneric, API )
|
||||
else if (alpha == testinghelpers::ZERO<T>())
|
||||
thresh = testinghelpers::getEpsilon<T>();
|
||||
else
|
||||
thresh = (3*n+1)*n*testinghelpers::getEpsilon<T>();
|
||||
thresh = (3*n+1)*testinghelpers::getEpsilon<T>();
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
@@ -100,7 +100,7 @@ TEST_P( chemvGeneric, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
chemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -111,11 +111,42 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(scomplex{1.0, -2.0}), // alpha
|
||||
::testing::Values(scomplex{2.0, -1.0}), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values(scomplex{0.0, 0.0},scomplex{1.0, 0.0},
|
||||
scomplex{-1.0, 0.0},scomplex{1.0, -2.0}), // alpha
|
||||
::testing::Values(scomplex{0.0, 0.0},scomplex{1.0, 0.0},
|
||||
scomplex{-1.0, 0.0},scomplex{1.0, -2.0}), // beta
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::hemvGenericPrint<scomplex>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
chemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(scomplex{0.0, 0.0},scomplex{1.0, 0.0},
|
||||
scomplex{-1.0, 0.0},scomplex{1.0, -2.0}), // alpha
|
||||
::testing::Values(scomplex{0.0, 0.0},scomplex{1.0, 0.0},
|
||||
scomplex{-1.0, 0.0},scomplex{1.0, -2.0}), // beta
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::hemvGenericPrint<scomplex>()
|
||||
|
||||
@@ -95,16 +95,16 @@ class hemvGenericPrint {
|
||||
public:
|
||||
std::string operator()(
|
||||
testing::TestParamInfo<std::tuple<char,char,char,char,gtint_t,T,T,gtint_t,gtint_t,gtint_t>> str) const {
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char conja = std::get<2>(str.param);
|
||||
char conjx = std::get<3>(str.param);
|
||||
gtint_t n = std::get<4>(str.param);
|
||||
T alpha = std::get<5>(str.param);
|
||||
T beta = std::get<6>(str.param);
|
||||
gtint_t incx = std::get<7>(str.param);
|
||||
gtint_t incy = std::get<8>(str.param);
|
||||
gtint_t ld_inc = std::get<9>(str.param);
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char conja = std::get<2>(str.param);
|
||||
char conjx = std::get<3>(str.param);
|
||||
gtint_t n = std::get<4>(str.param);
|
||||
T alpha = std::get<5>(str.param);
|
||||
T beta = std::get<6>(str.param);
|
||||
gtint_t incx = std::get<7>(str.param);
|
||||
gtint_t incy = std::get<8>(str.param);
|
||||
gtint_t lda_inc = std::get<9>(str.param);
|
||||
|
||||
std::string str_name = API_PRINT;
|
||||
str_name += "_stor_" + std::string(&storage, 1);
|
||||
@@ -113,10 +113,11 @@ public:
|
||||
str_name += "_conjx_" + std::string(&conjx, 1);
|
||||
str_name += "_n_" + std::to_string(n);
|
||||
str_name += "_alpha_" + testinghelpers::get_value_string(alpha);
|
||||
str_name += "_beta_" + testinghelpers::get_value_string(beta);
|
||||
gtint_t lda = testinghelpers::get_leading_dimension( storage, 'n', n, n, lda_inc );
|
||||
str_name += "_lda_i" + std::to_string(lda_inc) + "_" + std::to_string(lda);
|
||||
str_name += "_incx_" + testinghelpers::get_value_string(incx);
|
||||
str_name += "_beta_" + testinghelpers::get_value_string(beta);
|
||||
str_name += "_incy_" + testinghelpers::get_value_string(incy);
|
||||
str_name = str_name + "_" + std::to_string(ld_inc);
|
||||
return str_name;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -90,7 +90,7 @@ TEST_P( zhemvGeneric, API )
|
||||
else if (alpha == testinghelpers::ZERO<T>())
|
||||
thresh = testinghelpers::getEpsilon<T>();
|
||||
else
|
||||
thresh = (3*n+1)*n*testinghelpers::getEpsilon<T>();
|
||||
thresh = (3*n+1)*testinghelpers::getEpsilon<T>();
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
@@ -100,7 +100,7 @@ TEST_P( zhemvGeneric, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
zhemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -111,11 +111,42 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(dcomplex{1.0, -2.0}), // alpha
|
||||
::testing::Values(dcomplex{2.0, -1.0}), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values(dcomplex{0.0, 0.0},dcomplex{1.0, 0.0},
|
||||
dcomplex{-1.0, 0.0},dcomplex{1.0, -2.0}), // alpha
|
||||
::testing::Values(dcomplex{0.0, 0.0},dcomplex{1.0, 0.0},
|
||||
dcomplex{-1.0, 0.0},dcomplex{1.0, -2.0}), // beta
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::hemvGenericPrint<dcomplex>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
zhemvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(dcomplex{0.0, 0.0},dcomplex{1.0, 0.0},
|
||||
dcomplex{-1.0, 0.0},dcomplex{1.0, -2.0}), // alpha
|
||||
::testing::Values(dcomplex{0.0, 0.0},dcomplex{1.0, 0.0},
|
||||
dcomplex{-1.0, 0.0},dcomplex{1.0, -2.0}), // beta
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::hemvGenericPrint<dcomplex>()
|
||||
|
||||
@@ -72,12 +72,17 @@ TEST_P( cherGeneric, API )
|
||||
// Check gtestsuite her.h or netlib source code for reminder of the
|
||||
// functionality from which we estimate operation count per element
|
||||
// of output, and hence the multipler for epsilon.
|
||||
// No adjustment applied yet for complex data.
|
||||
// With adjustment for complex data.
|
||||
double thresh;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 2.0;
|
||||
#endif
|
||||
if (n == 0 || alpha == 0.0f)
|
||||
thresh = 0.0;
|
||||
else
|
||||
thresh = 3*testinghelpers::getEpsilon<T>();
|
||||
thresh = adj*3*testinghelpers::getEpsilon<T>();
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
@@ -87,7 +92,7 @@ TEST_P( cherGeneric, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
cherGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -97,10 +102,34 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(1.0), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(3)) // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::herGenericPrint<float>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
cherGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::herGenericPrint<float>()
|
||||
);
|
||||
|
||||
@@ -85,13 +85,13 @@ class herGenericPrint {
|
||||
public:
|
||||
std::string operator()(
|
||||
testing::TestParamInfo<std::tuple<char,char,char,gtint_t,T,gtint_t,gtint_t>> str) const {
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char conjx = std::get<2>(str.param);
|
||||
gtint_t n = std::get<3>(str.param);
|
||||
T alpha = std::get<4>(str.param);
|
||||
gtint_t incx = std::get<5>(str.param);
|
||||
gtint_t ld_inc = std::get<6>(str.param);
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char conjx = std::get<2>(str.param);
|
||||
gtint_t n = std::get<3>(str.param);
|
||||
T alpha = std::get<4>(str.param);
|
||||
gtint_t incx = std::get<5>(str.param);
|
||||
gtint_t lda_inc = std::get<6>(str.param);
|
||||
|
||||
std::string str_name = API_PRINT;
|
||||
str_name += "_stor_" + std::string(&storage, 1);
|
||||
@@ -100,7 +100,8 @@ public:
|
||||
str_name += "_n_" + std::to_string(n);
|
||||
str_name += "_incx_" + testinghelpers::get_value_string(incx);
|
||||
str_name += "_alpha_" + testinghelpers::get_value_string(alpha);
|
||||
str_name = str_name + "_" + std::to_string(ld_inc);
|
||||
gtint_t lda = testinghelpers::get_leading_dimension( storage, 'n', n, n, lda_inc );
|
||||
str_name += "_lda_i" + std::to_string(lda_inc) + "_" + std::to_string(lda);
|
||||
return str_name;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -74,7 +74,11 @@ TEST_P( zherGeneric, API )
|
||||
// of output, and hence the multipler for epsilon.
|
||||
// With adjustment for complex data.
|
||||
double thresh;
|
||||
double adj = 1.5;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 2.0;
|
||||
#endif
|
||||
if (n == 0 || alpha == 0.0)
|
||||
thresh = 0.0;
|
||||
else
|
||||
@@ -88,7 +92,7 @@ TEST_P( zherGeneric, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
zherGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -98,10 +102,34 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(1.0), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(2)) // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::herGenericPrint<double>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
zherGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::herGenericPrint<double>()
|
||||
);
|
||||
|
||||
@@ -80,7 +80,14 @@ TEST_P( cher2Generic, API )
|
||||
// of output, and hence the multipler for epsilon.
|
||||
// With adjustment for complex data.
|
||||
double thresh;
|
||||
double adj = 1.5;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 4.0;
|
||||
#ifdef REF_IS_MKL
|
||||
adj = 6.0;
|
||||
#endif
|
||||
#endif
|
||||
if (n == 0 || alpha == testinghelpers::ZERO<T>())
|
||||
thresh = 0.0;
|
||||
else
|
||||
@@ -94,7 +101,7 @@ TEST_P( cher2Generic, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
cher2Generic,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -103,13 +110,41 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values('n'), // conjy
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(scomplex{1.0, -2.0}), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(2)) // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values(scomplex{0.0, 0.0},scomplex{1.0, 0.0},
|
||||
scomplex{-1.0, 0.0},scomplex{1.0, -2.0}), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::her2GenericPrint<scomplex>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
cher2Generic,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(scomplex{0.0, 0.0},scomplex{1.0, 0.0},
|
||||
scomplex{-1.0, 0.0},scomplex{1.0, -2.0}), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::her2GenericPrint<scomplex>()
|
||||
);
|
||||
|
||||
@@ -88,15 +88,15 @@ class her2GenericPrint {
|
||||
public:
|
||||
std::string operator()(
|
||||
testing::TestParamInfo<std::tuple<char,char,char,char,gtint_t,T,gtint_t,gtint_t,gtint_t>> str) const {
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char conjx = std::get<2>(str.param);
|
||||
char conjy = std::get<3>(str.param);
|
||||
gtint_t n = std::get<4>(str.param);
|
||||
T alpha = std::get<5>(str.param);
|
||||
gtint_t incx = std::get<6>(str.param);
|
||||
gtint_t incy = std::get<7>(str.param);
|
||||
gtint_t ld_inc = std::get<8>(str.param);
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char conjx = std::get<2>(str.param);
|
||||
char conjy = std::get<3>(str.param);
|
||||
gtint_t n = std::get<4>(str.param);
|
||||
T alpha = std::get<5>(str.param);
|
||||
gtint_t incx = std::get<6>(str.param);
|
||||
gtint_t incy = std::get<7>(str.param);
|
||||
gtint_t lda_inc = std::get<8>(str.param);
|
||||
|
||||
std::string str_name = API_PRINT;
|
||||
str_name += "_stor_" + std::string(&storage, 1);
|
||||
@@ -107,7 +107,8 @@ public:
|
||||
str_name += "_alpha_" + testinghelpers::get_value_string(alpha);
|
||||
str_name += "_incx_" + testinghelpers::get_value_string(incx);
|
||||
str_name += "_incy_" + testinghelpers::get_value_string(incy);
|
||||
str_name = str_name + "_" + std::to_string(ld_inc);
|
||||
gtint_t lda = testinghelpers::get_leading_dimension( storage, 'n', n, n, lda_inc );
|
||||
str_name += "_lda_i" + std::to_string(lda_inc) + "_" + std::to_string(lda);
|
||||
return str_name;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -80,7 +80,11 @@ TEST_P( zher2Generic, API )
|
||||
// of output, and hence the multipler for epsilon.
|
||||
// With adjustment for complex data.
|
||||
double thresh;
|
||||
double adj = 2.2;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 6.0;
|
||||
#endif
|
||||
if (n == 0 || alpha == testinghelpers::ZERO<T>())
|
||||
thresh = 0.0;
|
||||
else
|
||||
@@ -94,7 +98,7 @@ TEST_P( zher2Generic, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
zher2Generic,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -103,13 +107,41 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values('n'), // conjy
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(dcomplex{1.0, -2.0}), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values(dcomplex{0.0, 0.0},dcomplex{1.0, 0.0},
|
||||
dcomplex{-1.0, 0.0},dcomplex{1.0, -2.0}), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::her2GenericPrint<dcomplex>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
zher2Generic,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(dcomplex{0.0, 0.0},dcomplex{1.0, 0.0},
|
||||
dcomplex{-1.0, 0.0},dcomplex{1.0, -2.0}), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::her2GenericPrint<dcomplex>()
|
||||
);
|
||||
|
||||
@@ -82,6 +82,14 @@ TEST_P( dsymvGeneric, API )
|
||||
// functionality from which we estimate operation count per element
|
||||
// of output, and hence the multipler for epsilon.
|
||||
double thresh;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 1.3;
|
||||
#ifdef REF_IS_MKL
|
||||
adj = 1.4;
|
||||
#endif
|
||||
#endif
|
||||
if (n == 0)
|
||||
thresh = 0.0;
|
||||
else if (alpha == testinghelpers::ZERO<T>() && (beta == testinghelpers::ZERO<T>() || beta == testinghelpers::ONE<T>()))
|
||||
@@ -89,7 +97,7 @@ TEST_P( dsymvGeneric, API )
|
||||
else if (alpha == testinghelpers::ZERO<T>())
|
||||
thresh = testinghelpers::getEpsilon<T>();
|
||||
else
|
||||
thresh = (3*n+1)*testinghelpers::getEpsilon<T>();
|
||||
thresh = adj*(3*n+1)*testinghelpers::getEpsilon<T>();
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
@@ -99,7 +107,7 @@ TEST_P( dsymvGeneric, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
dsymvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -110,12 +118,39 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values( 1.0, -2.0 ), // alpha
|
||||
::testing::Values( 2.0, -1.0 ), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(3)) // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // beta
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::symvGenericPrint<double>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
dsymvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // beta
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::symvGenericPrint<double>()
|
||||
);
|
||||
|
||||
@@ -82,6 +82,14 @@ TEST_P( ssymvGeneric, API )
|
||||
// functionality from which we estimate operation count per element
|
||||
// of output, and hence the multipler for epsilon.
|
||||
double thresh;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 1.1;
|
||||
#ifdef REF_IS_MKL
|
||||
adj = 1.4;
|
||||
#endif
|
||||
#endif
|
||||
if (n == 0)
|
||||
thresh = 0.0;
|
||||
else if (alpha == testinghelpers::ZERO<T>() && (beta == testinghelpers::ZERO<T>() || beta == testinghelpers::ONE<T>()))
|
||||
@@ -89,7 +97,7 @@ TEST_P( ssymvGeneric, API )
|
||||
else if (alpha == testinghelpers::ZERO<T>())
|
||||
thresh = testinghelpers::getEpsilon<T>();
|
||||
else
|
||||
thresh = (3*n+1)*testinghelpers::getEpsilon<T>();
|
||||
thresh = adj*(3*n+1)*testinghelpers::getEpsilon<T>();
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
@@ -99,7 +107,7 @@ TEST_P( ssymvGeneric, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
ssymvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -110,12 +118,39 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values( 1.0, -2.0 ), // alpha
|
||||
::testing::Values( 2.0, -1.0 ), // beta
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // beta
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::symvGenericPrint<float>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
ssymvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // beta
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::symvGenericPrint<float>()
|
||||
);
|
||||
|
||||
@@ -95,16 +95,16 @@ class symvGenericPrint {
|
||||
public:
|
||||
std::string operator()(
|
||||
testing::TestParamInfo<std::tuple<char,char,char,char,gtint_t,T,T,gtint_t,gtint_t,gtint_t>> str) const {
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char conja = std::get<2>(str.param);
|
||||
char conjx = std::get<3>(str.param);
|
||||
gtint_t n = std::get<4>(str.param);
|
||||
T alpha = std::get<5>(str.param);
|
||||
T beta = std::get<6>(str.param);
|
||||
gtint_t incx = std::get<7>(str.param);
|
||||
gtint_t incy = std::get<8>(str.param);
|
||||
gtint_t ld_inc = std::get<9>(str.param);
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char conja = std::get<2>(str.param);
|
||||
char conjx = std::get<3>(str.param);
|
||||
gtint_t n = std::get<4>(str.param);
|
||||
T alpha = std::get<5>(str.param);
|
||||
T beta = std::get<6>(str.param);
|
||||
gtint_t incx = std::get<7>(str.param);
|
||||
gtint_t incy = std::get<8>(str.param);
|
||||
gtint_t lda_inc = std::get<9>(str.param);
|
||||
|
||||
std::string str_name = API_PRINT;
|
||||
str_name += "_stor_" + std::string(&storage, 1);
|
||||
@@ -113,10 +113,11 @@ public:
|
||||
str_name += "_conjx_" + std::string(&conjx, 1);
|
||||
str_name += "_n_" + std::to_string(n);
|
||||
str_name += "_alpha_" + testinghelpers::get_value_string(alpha);
|
||||
str_name += "_beta_" + testinghelpers::get_value_string(beta);
|
||||
gtint_t lda = testinghelpers::get_leading_dimension( storage, 'n', n, n, lda_inc );
|
||||
str_name += "_lda_i" + std::to_string(lda_inc) + "_" + std::to_string(lda);
|
||||
str_name += "_incx_" + testinghelpers::get_value_string(incx);
|
||||
str_name += "_beta_" + testinghelpers::get_value_string(beta);
|
||||
str_name += "_incy_" + testinghelpers::get_value_string(incy);
|
||||
str_name = str_name + "_" + std::to_string(ld_inc);
|
||||
return str_name;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -86,7 +86,7 @@ TEST_P( dsyrGeneric, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
dsyrGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -96,10 +96,34 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(1.0), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(3)) // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::syrGenericPrint<double>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
dsyrGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::syrGenericPrint<double>()
|
||||
);
|
||||
|
||||
@@ -86,7 +86,7 @@ TEST_P( ssyrGeneric, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
ssyrGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -96,10 +96,34 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(1.0), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(3)) // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::syrGenericPrint<float>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
ssyrGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::syrGenericPrint<float>()
|
||||
);
|
||||
|
||||
@@ -85,13 +85,13 @@ class syrGenericPrint {
|
||||
public:
|
||||
std::string operator()(
|
||||
testing::TestParamInfo<std::tuple<char,char,char,gtint_t,T,gtint_t,gtint_t>> str) const {
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char conjx = std::get<2>(str.param);
|
||||
gtint_t n = std::get<3>(str.param);
|
||||
T alpha = std::get<4>(str.param);
|
||||
gtint_t incx = std::get<5>(str.param);
|
||||
gtint_t ld_inc = std::get<6>(str.param);
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char conjx = std::get<2>(str.param);
|
||||
gtint_t n = std::get<3>(str.param);
|
||||
T alpha = std::get<4>(str.param);
|
||||
gtint_t incx = std::get<5>(str.param);
|
||||
gtint_t lda_inc = std::get<6>(str.param);
|
||||
|
||||
std::string str_name = API_PRINT;
|
||||
str_name += "_stor_" + std::string(&storage, 1);
|
||||
@@ -100,7 +100,8 @@ public:
|
||||
str_name += "_n_" + std::to_string(n);
|
||||
str_name += "_incx_" + testinghelpers::get_value_string(incx);
|
||||
str_name += "_alpha_" + testinghelpers::get_value_string(alpha);
|
||||
str_name = str_name + "_" + std::to_string(ld_inc);
|
||||
gtint_t lda = testinghelpers::get_leading_dimension( storage, 'n', n, n, lda_inc );
|
||||
str_name += "_lda_i" + std::to_string(lda_inc) + "_" + std::to_string(lda);
|
||||
return str_name;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -79,10 +79,15 @@ TEST_P( dsyr2Generic, API )
|
||||
// functionality from which we estimate operation count per element
|
||||
// of output, and hence the multipler for epsilon.
|
||||
double thresh;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.34;
|
||||
#else
|
||||
double adj = 4.0;
|
||||
#endif
|
||||
if (n == 0 || alpha == testinghelpers::ZERO<T>())
|
||||
thresh = 0.0;
|
||||
else
|
||||
thresh = 6*testinghelpers::getEpsilon<T>();
|
||||
thresh = adj*6*testinghelpers::getEpsilon<T>();
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
@@ -92,7 +97,7 @@ TEST_P( dsyr2Generic, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
dsyr2Generic,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -101,13 +106,39 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values('n'), // conjy
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(1.0, -2.0), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(3)) // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::syr2GenericPrint<double>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
dsyr2Generic,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::syr2GenericPrint<double>()
|
||||
);
|
||||
|
||||
@@ -79,10 +79,15 @@ TEST_P( ssyr2Generic, API )
|
||||
// functionality from which we estimate operation count per element
|
||||
// of output, and hence the multipler for epsilon.
|
||||
double thresh;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 3.0;
|
||||
#endif
|
||||
if (n == 0 || alpha == testinghelpers::ZERO<T>())
|
||||
thresh = 0.0;
|
||||
else
|
||||
thresh = 6*testinghelpers::getEpsilon<T>();
|
||||
thresh = adj*6*testinghelpers::getEpsilon<T>();
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
@@ -92,7 +97,7 @@ TEST_P( ssyr2Generic, API )
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
ssyr2Generic,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -101,13 +106,39 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values('n'), // conjy
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(1.0, -2.0), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(1)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::syr2GenericPrint<float>()
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
ssyr2Generic,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n'), // conja
|
||||
::testing::Values('n'), // conjx
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values( 0.0, 1.0, -1.0, 2.7 ), // alpha
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for x
|
||||
::testing::Values(gtint_t(1),gtint_t(-1),gtint_t(2)), // stride size for y
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
),
|
||||
::syr2GenericPrint<float>()
|
||||
);
|
||||
|
||||
@@ -88,15 +88,15 @@ class syr2GenericPrint {
|
||||
public:
|
||||
std::string operator()(
|
||||
testing::TestParamInfo<std::tuple<char,char,char,char,gtint_t,T,gtint_t,gtint_t,gtint_t>> str) const {
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char conjx = std::get<2>(str.param);
|
||||
char conjy = std::get<3>(str.param);
|
||||
gtint_t n = std::get<4>(str.param);
|
||||
T alpha = std::get<5>(str.param);
|
||||
gtint_t incx = std::get<6>(str.param);
|
||||
gtint_t incy = std::get<7>(str.param);
|
||||
gtint_t ld_inc = std::get<8>(str.param);
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char conjx = std::get<2>(str.param);
|
||||
char conjy = std::get<3>(str.param);
|
||||
gtint_t n = std::get<4>(str.param);
|
||||
T alpha = std::get<5>(str.param);
|
||||
gtint_t incx = std::get<6>(str.param);
|
||||
gtint_t incy = std::get<7>(str.param);
|
||||
gtint_t lda_inc = std::get<8>(str.param);
|
||||
|
||||
std::string str_name = API_PRINT;
|
||||
str_name += "_stor_" + std::string(&storage, 1);
|
||||
@@ -107,7 +107,8 @@ public:
|
||||
str_name += "_alpha_" + testinghelpers::get_value_string(alpha);
|
||||
str_name += "_incx_" + testinghelpers::get_value_string(incx);
|
||||
str_name += "_incy_" + testinghelpers::get_value_string(incy);
|
||||
str_name = str_name + "_" + std::to_string(ld_inc);
|
||||
gtint_t lda = testinghelpers::get_leading_dimension( storage, 'n', n, n, lda_inc );
|
||||
str_name += "_lda_i" + std::to_string(lda_inc) + "_" + std::to_string(lda);
|
||||
return str_name;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -33,17 +33,18 @@
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "test_trmv.h"
|
||||
#include "level2/trmv/test_trmv.h"
|
||||
|
||||
class ctrmvGeneric :
|
||||
public ::testing::TestWithParam<std::tuple<char,
|
||||
char,
|
||||
char,
|
||||
char,
|
||||
gtint_t,
|
||||
scomplex,
|
||||
gtint_t,
|
||||
gtint_t>> {};
|
||||
public ::testing::TestWithParam<std::tuple<char, // storage format
|
||||
char, // uplo
|
||||
char, // trans
|
||||
char, // diag
|
||||
gtint_t, // n
|
||||
scomplex, // alpha
|
||||
gtint_t, // incx
|
||||
gtint_t, // ld_inc
|
||||
bool>> {}; // is memory test
|
||||
|
||||
TEST_P( ctrmvGeneric, API )
|
||||
{
|
||||
@@ -54,9 +55,9 @@ TEST_P( ctrmvGeneric, API )
|
||||
//----------------------------------------------------------
|
||||
// matrix storage format(row major, column major)
|
||||
char storage = std::get<0>(GetParam());
|
||||
// denotes whether matrix a is u,l
|
||||
// denotes whether matrix A is u,l
|
||||
char uploa = std::get<1>(GetParam());
|
||||
// denotes whether matrix a is n,c,t,h
|
||||
// denotes whether matrix A is n,c,t,h
|
||||
char transa = std::get<2>(GetParam());
|
||||
// denotes whether matrix diag is u,n
|
||||
char diaga = std::get<3>(GetParam());
|
||||
@@ -64,54 +65,94 @@ TEST_P( ctrmvGeneric, API )
|
||||
gtint_t n = std::get<4>(GetParam());
|
||||
// specifies alpha value
|
||||
T alpha = std::get<5>(GetParam());
|
||||
// stride size for x:
|
||||
// increment for x (incx):
|
||||
gtint_t incx = std::get<6>(GetParam());
|
||||
// lda increment.
|
||||
// If increment is zero, then the array size matches the matrix size.
|
||||
// If increment are nonnegative, the array size is bigger than the matrix size.
|
||||
gtint_t lda_inc = std::get<7>(GetParam());
|
||||
bool is_mem_test = std::get<8>(GetParam());
|
||||
|
||||
// Set the threshold for the errors:
|
||||
// Check gtestsuite trmv.h or netlib source code for reminder of the
|
||||
// functionality from which we estimate operation count per element
|
||||
// of output, and hence the multipler for epsilon.
|
||||
// No adjustment applied yet for complex data.
|
||||
// With adjustment for complex data.
|
||||
double thresh;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 1.0;
|
||||
#endif
|
||||
if (n == 0 || alpha == T{0.0})
|
||||
thresh = 0.0;
|
||||
else
|
||||
if(alpha == T{1.0})
|
||||
thresh = 2*n*testinghelpers::getEpsilon<T>();
|
||||
thresh = adj*2*n*testinghelpers::getEpsilon<T>();
|
||||
else
|
||||
thresh = 3*n*testinghelpers::getEpsilon<T>();
|
||||
thresh = adj*3*n*testinghelpers::getEpsilon<T>();
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
//----------------------------------------------------------
|
||||
test_trmv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh );
|
||||
test_trmv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh, is_mem_test );
|
||||
}
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
ctrmvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','c','t'), // transa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(scomplex{1.0, 0.0}
|
||||
#ifdef TEST_BLIS_TYPED
|
||||
, scomplex{1.0, -2.0}
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values(scomplex{1.0, 0.0} // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
,scomplex{6.1, -2.9}, scomplex{-3.3, -1.4}
|
||||
,scomplex{-1.0, 0.0}, scomplex{0.0, 0.0}
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(9)) // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trmvGenericPrint<scomplex>()
|
||||
);
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
ctrmvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(scomplex{1.0, 0.0} // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
,scomplex{6.1, -2.9}, scomplex{-3.3, -1.4}
|
||||
,scomplex{-1.0, 0.0}, scomplex{0.0, 0.0}
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trmvGenericPrint<scomplex>()
|
||||
);
|
||||
@@ -33,17 +33,18 @@
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "test_trmv.h"
|
||||
#include "level2/trmv/test_trmv.h"
|
||||
|
||||
class dtrmvGeneric :
|
||||
public ::testing::TestWithParam<std::tuple<char,
|
||||
char,
|
||||
char,
|
||||
char,
|
||||
gtint_t,
|
||||
double,
|
||||
gtint_t,
|
||||
gtint_t>> {};
|
||||
public ::testing::TestWithParam<std::tuple<char, // storage format
|
||||
char, // uplo
|
||||
char, // trans
|
||||
char, // diag
|
||||
gtint_t, // n
|
||||
double, // alpha
|
||||
gtint_t, // incx
|
||||
gtint_t, // ld_inc
|
||||
bool>> {}; // is memory test
|
||||
|
||||
TEST_P( dtrmvGeneric, API )
|
||||
{
|
||||
@@ -54,9 +55,9 @@ TEST_P( dtrmvGeneric, API )
|
||||
//----------------------------------------------------------
|
||||
// matrix storage format(row major, column major)
|
||||
char storage = std::get<0>(GetParam());
|
||||
// denotes whether matrix a is u,l
|
||||
// denotes whether matrix A is u,l
|
||||
char uploa = std::get<1>(GetParam());
|
||||
// denotes whether matrix a is n,c,t,h
|
||||
// denotes whether matrix A is n,c,t,h
|
||||
char transa = std::get<2>(GetParam());
|
||||
// denotes whether matrix diag is u,n
|
||||
char diaga = std::get<3>(GetParam());
|
||||
@@ -64,12 +65,13 @@ TEST_P( dtrmvGeneric, API )
|
||||
gtint_t n = std::get<4>(GetParam());
|
||||
// specifies alpha value
|
||||
T alpha = std::get<5>(GetParam());
|
||||
// stride size for x:
|
||||
// increment for x (incx):
|
||||
gtint_t incx = std::get<6>(GetParam());
|
||||
// lda increment.
|
||||
// If increment is zero, then the array size matches the matrix size.
|
||||
// If increment are nonnegative, the array size is bigger than the matrix size.
|
||||
gtint_t lda_inc = std::get<7>(GetParam());
|
||||
bool is_mem_test = std::get<8>(GetParam());
|
||||
|
||||
// Set the threshold for the errors:
|
||||
// Check gtestsuite trmv.h or netlib source code for reminder of the
|
||||
@@ -77,7 +79,11 @@ TEST_P( dtrmvGeneric, API )
|
||||
// of output, and hence the multipler for epsilon.
|
||||
double thresh;
|
||||
// Threshold adjustment
|
||||
double adj = 1.5;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 1.0;
|
||||
#endif
|
||||
if (n == 0 || alpha == T{0.0})
|
||||
thresh = 0.0;
|
||||
else
|
||||
@@ -89,30 +95,62 @@ TEST_P( dtrmvGeneric, API )
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
//----------------------------------------------------------
|
||||
test_trmv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh );
|
||||
test_trmv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh, is_mem_test);
|
||||
}
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
dtrmvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','t'), // transa
|
||||
::testing::Values('n','u'), // diaga
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values( 1.0
|
||||
#ifdef TEST_BLIS_TYPED
|
||||
, -2.0
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values(1.0 // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
, -2.2, 5.4, -1.0, 0.0
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(3)) // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trmvGenericPrint<double>()
|
||||
);
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
dtrmvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(1.0 // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
, -2.2, 5.4, -1.0, 0.0
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trmvGenericPrint<double>()
|
||||
);
|
||||
@@ -33,17 +33,18 @@
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "test_trmv.h"
|
||||
#include "level2/trmv/test_trmv.h"
|
||||
|
||||
class strmvGeneric :
|
||||
public ::testing::TestWithParam<std::tuple<char,
|
||||
char,
|
||||
char,
|
||||
char,
|
||||
gtint_t,
|
||||
float,
|
||||
gtint_t,
|
||||
gtint_t>> {};
|
||||
public ::testing::TestWithParam<std::tuple<char, // storage format
|
||||
char, // uplo
|
||||
char, // trans
|
||||
char, // diag
|
||||
gtint_t, // n
|
||||
float, // alpha
|
||||
gtint_t, // incx
|
||||
gtint_t, // ld_inc
|
||||
bool>> {}; // is memory test
|
||||
|
||||
TEST_P( strmvGeneric, API )
|
||||
{
|
||||
@@ -54,9 +55,9 @@ TEST_P( strmvGeneric, API )
|
||||
//----------------------------------------------------------
|
||||
// matrix storage format(row major, column major)
|
||||
char storage = std::get<0>(GetParam());
|
||||
// denotes whether matrix a is u,l
|
||||
// denotes whether matrix A is u,l
|
||||
char uploa = std::get<1>(GetParam());
|
||||
// denotes whether matrix a is n,c,t,h
|
||||
// denotes whether matrix A is n,c,t,h
|
||||
char transa = std::get<2>(GetParam());
|
||||
// denotes whether matrix diag is u,n
|
||||
char diaga = std::get<3>(GetParam());
|
||||
@@ -64,12 +65,13 @@ TEST_P( strmvGeneric, API )
|
||||
gtint_t n = std::get<4>(GetParam());
|
||||
// specifies alpha value
|
||||
T alpha = std::get<5>(GetParam());
|
||||
// stride size for x:
|
||||
// increment for x (incx):
|
||||
gtint_t incx = std::get<6>(GetParam());
|
||||
// lda increment.
|
||||
// If increment is zero, then the array size matches the matrix size.
|
||||
// If increment are nonnegative, the array size is bigger than the matrix size.
|
||||
gtint_t lda_inc = std::get<7>(GetParam());
|
||||
bool is_mem_test = std::get<8>(GetParam());
|
||||
|
||||
// Set the threshold for the errors:
|
||||
// Check gtestsuite trmv.h or netlib source code for reminder of the
|
||||
@@ -77,7 +79,11 @@ TEST_P( strmvGeneric, API )
|
||||
// of output, and hence the multipler for epsilon.
|
||||
double thresh;
|
||||
// Threshold adjustment
|
||||
double adj = 1.5;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 1.0;
|
||||
#endif
|
||||
if (n == 0 || alpha == T{0.0})
|
||||
thresh = 0.0;
|
||||
else
|
||||
@@ -89,30 +95,62 @@ TEST_P( strmvGeneric, API )
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
//----------------------------------------------------------
|
||||
test_trmv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh );
|
||||
test_trmv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh, is_mem_test);
|
||||
}
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
strmvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','t'), // transa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values( 1.0
|
||||
#ifdef TEST_BLIS_TYPED
|
||||
, -2.0
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values(1.0 // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
, -2.2, 5.4, -1.0, 0.0
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(1)) // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trmvGenericPrint<float>()
|
||||
);
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
strmvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(1.0 // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
, -2.2, 5.4, -1.0, 0.0
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trmvGenericPrint<float>()
|
||||
);
|
||||
@@ -39,38 +39,113 @@
|
||||
#include "inc/check_error.h"
|
||||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
#include "common/testing_helpers.h"
|
||||
|
||||
template<typename T>
|
||||
void test_trmv( char storage, char uploa, char transa, char diaga, gtint_t n,
|
||||
T alpha, gtint_t lda_inc, gtint_t incx, double thresh )
|
||||
void test_trmv(
|
||||
char storage,
|
||||
char uploa,
|
||||
char transa,
|
||||
char diaga,
|
||||
gtint_t n,
|
||||
T alpha,
|
||||
gtint_t lda_inc,
|
||||
gtint_t incx,
|
||||
double thresh,
|
||||
bool is_memory_test = false,
|
||||
bool is_evt_test = false,
|
||||
T evt_x = T{0},
|
||||
T evt_a = T{0}
|
||||
)
|
||||
{
|
||||
using RT = typename testinghelpers::type_info<T>::real_type;
|
||||
// Compute the leading dimensions for matrix size calculation.
|
||||
gtint_t lda = testinghelpers::get_leading_dimension( storage, transa, n, n, lda_inc );
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Initialize matrics with random integer numbers.
|
||||
//----------------------------------------------------------
|
||||
std::vector<T> a = testinghelpers::get_random_matrix<T>( -2, 8, storage, transa, n, n, lda );
|
||||
std::vector<T> x = testinghelpers::get_random_vector<T>( -10, 10, n, incx );
|
||||
|
||||
testinghelpers::make_triangular<T>( storage, uploa, n, a.data(), lda );
|
||||
dim_t size_a = testinghelpers::matsize(storage, transa, n, n, lda) * sizeof(T);
|
||||
|
||||
// Create a copy of c so that we can check reference results.
|
||||
std::vector<T> x_ref(x);
|
||||
// Buffers for A matrix and X vector are always unaligned
|
||||
testinghelpers::ProtectedBuffer a(size_a, false, is_memory_test );
|
||||
testinghelpers::datagenerators::randomgenerators<T>( 0, 1, storage, n, n, (T*)(a.greenzone_1), transa, lda );
|
||||
|
||||
dim_t size_x = testinghelpers::buff_dim(n, incx) * sizeof(T);
|
||||
testinghelpers::ProtectedBuffer x(size_x, false, is_memory_test );
|
||||
testinghelpers::datagenerators::randomgenerators<T>( 1, 3, n, incx, (T*)(x.greenzone_1) );
|
||||
|
||||
T* a_ptr = (T*)(a.greenzone_1);
|
||||
T* x_ptr = (T*)(x.greenzone_1);
|
||||
|
||||
// Make A matix diagonal dominant to make sure that algorithm doesn't diverge
|
||||
// This makes sure that the trmv problem is solvable
|
||||
for ( dim_t a_dim = 0; a_dim < n; ++a_dim )
|
||||
{
|
||||
a_ptr[ a_dim + (a_dim* lda) ] = a_ptr[ a_dim + (a_dim* lda) ] + T{RT(n)};
|
||||
}
|
||||
|
||||
// add extreme values to the X vector
|
||||
if ( is_evt_test )
|
||||
{
|
||||
x_ptr[ (rand() % n) * std::abs(incx) ] = evt_x;
|
||||
}
|
||||
|
||||
// add extreme values to the A matrix
|
||||
if ( is_evt_test )
|
||||
{
|
||||
dim_t n_idx = rand() % n;
|
||||
dim_t m_idx = (std::max)((dim_t)0, n_idx - 1);
|
||||
a_ptr[ m_idx + (n_idx * lda) ] = evt_a;
|
||||
a_ptr[ m_idx + (m_idx *lda) ] = evt_a;
|
||||
}
|
||||
|
||||
// skipped making A triangular
|
||||
// A matrix being a non triangular matrix could be a better test
|
||||
// because we are exepcted to read only from the upper or lower triangular
|
||||
// part of the data, contents of the rest of the matrix should not change the
|
||||
// result.
|
||||
// testinghelpers::make_triangular<T>( storage, uploa, n, a_ptr, lda );
|
||||
|
||||
// Create a copy of x so that we can check reference results.
|
||||
std::vector<T> x_ref(testinghelpers::buff_dim(n, incx));
|
||||
memcpy(x_ref.data(), x_ptr, size_x);
|
||||
//----------------------------------------------------------
|
||||
// Call BLIS function
|
||||
//----------------------------------------------------------
|
||||
trmv<T>( storage, uploa, transa, diaga, n, &alpha, a.data(), lda, x.data(), incx );
|
||||
// add signal handler for segmentation fault
|
||||
testinghelpers::ProtectedBuffer::start_signal_handler();
|
||||
try
|
||||
{
|
||||
trmv<T>( storage, uploa, transa, diaga, n, &alpha, a_ptr, lda, x_ptr, incx );
|
||||
if ( is_memory_test )
|
||||
{
|
||||
memcpy(a.greenzone_2, a.greenzone_1, size_a);
|
||||
memcpy(x.greenzone_2, x_ref.data(), size_x);
|
||||
trmv<T>( storage, uploa, transa, diaga, n, &alpha, (T*)a.greenzone_2, lda, (T*)x.greenzone_2, incx );
|
||||
}
|
||||
}
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
// reset to default signal handler
|
||||
testinghelpers::ProtectedBuffer::stop_signal_handler();
|
||||
|
||||
// show failure in case seg fault was detected
|
||||
FAIL() << "Memory Test Failed";
|
||||
}
|
||||
// reset to default signal handler
|
||||
testinghelpers::ProtectedBuffer::stop_signal_handler();
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Call reference implementation.
|
||||
//----------------------------------------------------------
|
||||
testinghelpers::ref_trmv<T>( storage, uploa, transa, diaga, n, &alpha, a.data(), lda, x_ref.data(), incx );
|
||||
testinghelpers::ref_trmv<T>( storage, uploa, transa, diaga, n, &alpha, a_ptr, lda, x_ref.data(), incx );
|
||||
|
||||
//----------------------------------------------------------
|
||||
// check component-wise error.
|
||||
//----------------------------------------------------------
|
||||
computediff<T>( "x", n, x.data(), x_ref.data(), incx, thresh );
|
||||
computediff<T>( "x", n, x_ptr, x_ref.data(), incx, thresh, is_evt_test );
|
||||
|
||||
#ifdef CAN_TEST_INFO_VALUE
|
||||
gtint_t info = bli_info_get_info_value();
|
||||
@@ -83,15 +158,16 @@ template <typename T>
|
||||
class trmvGenericPrint {
|
||||
public:
|
||||
std::string operator()(
|
||||
testing::TestParamInfo<std::tuple<char,char,char,char,gtint_t,T,gtint_t,gtint_t>> str) const {
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char transa = std::get<2>(str.param);
|
||||
char diaga = std::get<3>(str.param);
|
||||
gtint_t n = std::get<4>(str.param);
|
||||
T alpha = std::get<5>(str.param);
|
||||
gtint_t incx = std::get<6>(str.param);
|
||||
gtint_t ld_inc = std::get<7>(str.param);
|
||||
testing::TestParamInfo<std::tuple<char,char,char,char,gtint_t,T,gtint_t,gtint_t,bool>> str) const {
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char transa = std::get<2>(str.param);
|
||||
char diaga = std::get<3>(str.param);
|
||||
gtint_t n = std::get<4>(str.param);
|
||||
T alpha = std::get<5>(str.param);
|
||||
gtint_t incx = std::get<6>(str.param);
|
||||
gtint_t lda_inc = std::get<7>(str.param);
|
||||
bool is_mem_test = std::get<8>(str.param);
|
||||
|
||||
std::string str_name = API_PRINT;
|
||||
str_name += "_stor_" + std::string(&storage, 1);
|
||||
@@ -101,7 +177,9 @@ public:
|
||||
str_name += "_n_" + std::to_string(n);
|
||||
str_name += "_alpha_" + testinghelpers::get_value_string(alpha);
|
||||
str_name += "_incx_" + testinghelpers::get_value_string(incx);
|
||||
str_name = str_name + "_" + std::to_string(ld_inc);
|
||||
gtint_t lda = testinghelpers::get_leading_dimension( storage, transa, n, n, lda_inc );
|
||||
str_name += "_lda_i" + std::to_string(lda_inc) + "_" + std::to_string(lda);
|
||||
str_name = str_name + (is_mem_test ? "_mem_test_enabled" : "_mem_test_disabled");
|
||||
return str_name;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -33,17 +33,18 @@
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "test_trmv.h"
|
||||
#include "level2/trmv/test_trmv.h"
|
||||
|
||||
class ztrmvGeneric :
|
||||
public ::testing::TestWithParam<std::tuple<char,
|
||||
char,
|
||||
char,
|
||||
char,
|
||||
gtint_t,
|
||||
dcomplex,
|
||||
gtint_t,
|
||||
gtint_t>> {};
|
||||
public ::testing::TestWithParam<std::tuple<char, // storage format
|
||||
char, // uplo
|
||||
char, // trans
|
||||
char, // diag
|
||||
gtint_t, // n
|
||||
dcomplex, // alpha
|
||||
gtint_t, // incx
|
||||
gtint_t, // ld_inc
|
||||
bool>> {}; // is memory test
|
||||
|
||||
TEST_P( ztrmvGeneric, API )
|
||||
{
|
||||
@@ -54,9 +55,9 @@ TEST_P( ztrmvGeneric, API )
|
||||
//----------------------------------------------------------
|
||||
// matrix storage format(row major, column major)
|
||||
char storage = std::get<0>(GetParam());
|
||||
// denotes whether matrix a is u,l
|
||||
// denotes whether matrix A is u,l
|
||||
char uploa = std::get<1>(GetParam());
|
||||
// denotes whether matrix a is n,c,t,h
|
||||
// denotes whether matrix A is n,c,t,h
|
||||
char transa = std::get<2>(GetParam());
|
||||
// denotes whether matrix diag is u,n
|
||||
char diaga = std::get<3>(GetParam());
|
||||
@@ -64,54 +65,94 @@ TEST_P( ztrmvGeneric, API )
|
||||
gtint_t n = std::get<4>(GetParam());
|
||||
// specifies alpha value
|
||||
T alpha = std::get<5>(GetParam());
|
||||
// stride size for x:
|
||||
// increment for x (incx):
|
||||
gtint_t incx = std::get<6>(GetParam());
|
||||
// lda increment.
|
||||
// If increment is zero, then the array size matches the matrix size.
|
||||
// If increment are nonnegative, the array size is bigger than the matrix size.
|
||||
gtint_t lda_inc = std::get<7>(GetParam());
|
||||
bool is_mem_test = std::get<8>(GetParam());
|
||||
|
||||
// Set the threshold for the errors:
|
||||
// Check gtestsuite trmv.h or netlib source code for reminder of the
|
||||
// functionality from which we estimate operation count per element
|
||||
// of output, and hence the multipler for epsilon.
|
||||
// No adjustment applied yet for complex data.
|
||||
// With adjustment for complex data.
|
||||
double thresh;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 1.0;
|
||||
#endif
|
||||
if (n == 0 || alpha == T{0.0})
|
||||
thresh = 0.0;
|
||||
else
|
||||
if(alpha == T{1.0})
|
||||
thresh = 2*n*testinghelpers::getEpsilon<T>();
|
||||
thresh = adj*2*n*testinghelpers::getEpsilon<T>();
|
||||
else
|
||||
thresh = 3*n*testinghelpers::getEpsilon<T>();
|
||||
thresh = adj*3*n*testinghelpers::getEpsilon<T>();
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
//----------------------------------------------------------
|
||||
test_trmv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh );
|
||||
test_trmv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh, is_mem_test );
|
||||
}
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
ztrmvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','c','t'), // transa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(dcomplex{1.0, 0.0}
|
||||
#ifdef TEST_BLIS_TYPED
|
||||
,dcomplex{1.0, -2.0}
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values(dcomplex{1.0, 0.0} // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
,dcomplex{6.1, -2.9}, dcomplex{-3.3, -1.4}
|
||||
,dcomplex{-1.0, 0.0}, dcomplex{0.0, 0.0}
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(5)) // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trmvGenericPrint<dcomplex>()
|
||||
);
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
ztrmvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(dcomplex{1.0, 0.0} // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
,dcomplex{6.1, -2.9}, dcomplex{-3.3, -1.4}
|
||||
,dcomplex{-1.0, 0.0}, dcomplex{0.0, 0.0}
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trmvGenericPrint<dcomplex>()
|
||||
);
|
||||
@@ -36,14 +36,15 @@
|
||||
#include "level2/trsv/test_trsv.h"
|
||||
|
||||
class ctrsvGeneric :
|
||||
public ::testing::TestWithParam<std::tuple<char,
|
||||
char,
|
||||
char,
|
||||
char,
|
||||
gtint_t,
|
||||
scomplex,
|
||||
gtint_t,
|
||||
gtint_t>> {};
|
||||
public ::testing::TestWithParam<std::tuple<char, // storage format
|
||||
char, // uplo
|
||||
char, // trans
|
||||
char, // diag
|
||||
gtint_t, // n
|
||||
scomplex, // alpha
|
||||
gtint_t, // incx
|
||||
gtint_t, // ld_inc
|
||||
bool>> {}; // is memory test
|
||||
|
||||
TEST_P( ctrsvGeneric, API )
|
||||
{
|
||||
@@ -54,9 +55,9 @@ TEST_P( ctrsvGeneric, API )
|
||||
//----------------------------------------------------------
|
||||
// matrix storage format(row major, column major)
|
||||
char storage = std::get<0>(GetParam());
|
||||
// denotes whether matrix a is u,l
|
||||
// denotes whether matrix A is u,l
|
||||
char uploa = std::get<1>(GetParam());
|
||||
// denotes whether matrix a is n,c,t,h
|
||||
// denotes whether matrix A is n,c,t,h
|
||||
char transa = std::get<2>(GetParam());
|
||||
// denotes whether matrix diag is u,n
|
||||
char diaga = std::get<3>(GetParam());
|
||||
@@ -64,12 +65,13 @@ TEST_P( ctrsvGeneric, API )
|
||||
gtint_t n = std::get<4>(GetParam());
|
||||
// specifies alpha value
|
||||
T alpha = std::get<5>(GetParam());
|
||||
// stride size for x:
|
||||
// increment for x (incx):
|
||||
gtint_t incx = std::get<6>(GetParam());
|
||||
// lda increment.
|
||||
// If increment is zero, then the array size matches the matrix size.
|
||||
// If increment are nonnegative, the array size is bigger than the matrix size.
|
||||
gtint_t lda_inc = std::get<7>(GetParam());
|
||||
bool is_mem_test = std::get<8>(GetParam());
|
||||
|
||||
// Set the threshold for the errors:
|
||||
// Check gtestsuite trsv.h or netlib source code for reminder of the
|
||||
@@ -77,8 +79,12 @@ TEST_P( ctrsvGeneric, API )
|
||||
// of output, and hence the multipler for epsilon.
|
||||
// With adjustment for complex data.
|
||||
double thresh;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 1.5;
|
||||
if(n == 0)
|
||||
#endif
|
||||
if (n == 0 || alpha == T{0.0})
|
||||
thresh = 0.0;
|
||||
else
|
||||
if(alpha == T{1.0})
|
||||
@@ -89,30 +95,64 @@ TEST_P( ctrsvGeneric, API )
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
//----------------------------------------------------------
|
||||
test_trsv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh );
|
||||
test_trsv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh, is_mem_test );
|
||||
}
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
ctrsvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','c','t'), // transa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values(scomplex{1.0, 0.0}
|
||||
#ifdef TEST_BLIS_TYPED
|
||||
, scomplex{1.0, -2.0}
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values(scomplex{1.0, 0.0} // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
,scomplex{6.1, -2.9}, scomplex{-3.3, -1.4}
|
||||
,scomplex{-1.0, 0.0}, scomplex{0.0, 0.0}
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(3)) // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trsvGenericPrint<scomplex>()
|
||||
);
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
ctrsvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(scomplex{1.0, 0.0} // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
,scomplex{6.1, -2.9}, scomplex{-3.3, -1.4}
|
||||
,scomplex{-1.0, 0.0}, scomplex{0.0, 0.0}
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trsvGenericPrint<scomplex>()
|
||||
);
|
||||
|
||||
@@ -82,7 +82,7 @@ TEST_P( dtrsvEVT, API )
|
||||
// functionality from which we estimate operation count per element
|
||||
// of output, and hence the multipler for epsilon.
|
||||
double thresh;
|
||||
if (n == 0)
|
||||
if (n == 0 || alpha == T{0.0})
|
||||
thresh = 0.0;
|
||||
else
|
||||
if(alpha == T{1.0})
|
||||
|
||||
@@ -65,7 +65,7 @@ TEST_P( dtrsvGeneric, API )
|
||||
gtint_t n = std::get<4>(GetParam());
|
||||
// specifies alpha value
|
||||
T alpha = std::get<5>(GetParam());
|
||||
// increment for x(incx):
|
||||
// increment for x (incx):
|
||||
gtint_t incx = std::get<6>(GetParam());
|
||||
// lda increment.
|
||||
// If increment is zero, then the array size matches the matrix size.
|
||||
@@ -79,8 +79,15 @@ TEST_P( dtrsvGeneric, API )
|
||||
// of output, and hence the multipler for epsilon.
|
||||
double thresh;
|
||||
// Threshold adjustment
|
||||
double adj = 15;
|
||||
if (n == 0)
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 7.5;
|
||||
#ifdef REF_IS_MKL
|
||||
adj = 8.3;
|
||||
#endif
|
||||
#endif
|
||||
if (n == 0 || alpha == T{0.0})
|
||||
thresh = 0.0;
|
||||
else
|
||||
if(alpha == T{1.0})
|
||||
@@ -94,8 +101,9 @@ TEST_P( dtrsvGeneric, API )
|
||||
test_trsv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh, is_mem_test);
|
||||
}
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Native,
|
||||
BlackboxSmall,
|
||||
dtrsvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -104,30 +112,48 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','t'), // transa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Values(gtint_t(32),
|
||||
gtint_t(24),
|
||||
gtint_t(8),
|
||||
gtint_t(4),
|
||||
gtint_t(2),
|
||||
gtint_t(1),
|
||||
gtint_t(15),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values( 1.0 // Only blis types api supports
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values(1.0 // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
, -2.2, 5.4, -1.0, 0.0
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(-153), gtint_t(-10),
|
||||
gtint_t(-2), gtint_t(-1),
|
||||
gtint_t( 1), gtint_t( 2),
|
||||
gtint_t(14), gtint_t(433)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(10), gtint_t(358)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trsvMemGenericPrint<double>()
|
||||
::trsvGenericPrint<double>()
|
||||
);
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
dtrsvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(1.0 // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
, -2.2, 5.4, -1.0, 0.0
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trsvGenericPrint<double>()
|
||||
);
|
||||
|
||||
@@ -36,14 +36,15 @@
|
||||
#include "level2/trsv/test_trsv.h"
|
||||
|
||||
class strsvGeneric :
|
||||
public ::testing::TestWithParam<std::tuple<char,
|
||||
char,
|
||||
char,
|
||||
char,
|
||||
gtint_t,
|
||||
float,
|
||||
gtint_t,
|
||||
gtint_t>> {};
|
||||
public ::testing::TestWithParam<std::tuple<char, // storage format
|
||||
char, // uplo
|
||||
char, // trans
|
||||
char, // diag
|
||||
gtint_t, // n
|
||||
float, // alpha
|
||||
gtint_t, // incx
|
||||
gtint_t, // ld_inc
|
||||
bool>> {}; // is memory test
|
||||
|
||||
TEST_P( strsvGeneric, API )
|
||||
{
|
||||
@@ -54,9 +55,9 @@ TEST_P( strsvGeneric, API )
|
||||
//----------------------------------------------------------
|
||||
// matrix storage format(row major, column major)
|
||||
char storage = std::get<0>(GetParam());
|
||||
// denotes whether matrix a is u,l
|
||||
// denotes whether matrix A is u,l
|
||||
char uploa = std::get<1>(GetParam());
|
||||
// denotes whether matrix a is n,c,t,h
|
||||
// denotes whether matrix A is n,c,t,h
|
||||
char transa = std::get<2>(GetParam());
|
||||
// denotes whether matrix diag is u,n
|
||||
char diaga = std::get<3>(GetParam());
|
||||
@@ -64,53 +65,98 @@ TEST_P( strsvGeneric, API )
|
||||
gtint_t n = std::get<4>(GetParam());
|
||||
// specifies alpha value
|
||||
T alpha = std::get<5>(GetParam());
|
||||
// stride size for x:
|
||||
// increment for x (incx):
|
||||
gtint_t incx = std::get<6>(GetParam());
|
||||
// lda increment.
|
||||
// If increment is zero, then the array size matches the matrix size.
|
||||
// If increment are nonnegative, the array size is bigger than the matrix size.
|
||||
gtint_t lda_inc = std::get<7>(GetParam());
|
||||
bool is_mem_test = std::get<8>(GetParam());
|
||||
|
||||
// Set the threshold for the errors:
|
||||
// Check gtestsuite trsv.h or netlib source code for reminder of the
|
||||
// functionality from which we estimate operation count per element
|
||||
// of output, and hence the multipler for epsilon.
|
||||
double thresh;
|
||||
if (n == 0)
|
||||
// Threshold adjustment
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 9.0;
|
||||
#ifdef REF_IS_MKL
|
||||
adj = 12.0;
|
||||
#endif
|
||||
#else
|
||||
double adj = 12.0;
|
||||
#ifdef REF_IS_MKL
|
||||
adj = 14.0;
|
||||
#endif
|
||||
#endif
|
||||
if (n == 0 || alpha == T{0.0})
|
||||
thresh = 0.0;
|
||||
else
|
||||
if(alpha == T{1.0})
|
||||
thresh = 2*n*testinghelpers::getEpsilon<T>();
|
||||
thresh = adj*2*n*testinghelpers::getEpsilon<T>();
|
||||
else
|
||||
thresh = 3*n*testinghelpers::getEpsilon<T>();
|
||||
thresh = adj*3*n*testinghelpers::getEpsilon<T>();
|
||||
|
||||
//----------------------------------------------------------
|
||||
// Call test body using these parameters
|
||||
//----------------------------------------------------------
|
||||
test_trsv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh );
|
||||
test_trsv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh, is_mem_test);
|
||||
}
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Blackbox,
|
||||
BlackboxSmall,
|
||||
strsvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','t'), // transa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Range(gtint_t(10), gtint_t(31), 10), // n
|
||||
::testing::Values( 1.0
|
||||
#ifdef TEST_BLIS_TYPED
|
||||
, -2.0
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values(1.0 // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
, -2.2, 5.4, -1.0, 0.0
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(1)), // stride size for x
|
||||
::testing::Values(gtint_t(0), gtint_t(7)) // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trsvGenericPrint<float>()
|
||||
);
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
strsvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(1.0 // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
, -2.2, 5.4, -1.0, 0.0
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trsvGenericPrint<float>()
|
||||
);
|
||||
|
||||
@@ -58,6 +58,7 @@ void test_trsv(
|
||||
T evt_a = T{0}
|
||||
)
|
||||
{
|
||||
using RT = typename testinghelpers::type_info<T>::real_type;
|
||||
// Compute the leading dimensions for matrix size calculation.
|
||||
gtint_t lda = testinghelpers::get_leading_dimension( storage, transa, n, n, lda_inc );
|
||||
|
||||
@@ -82,7 +83,7 @@ void test_trsv(
|
||||
// This makes sure that the TRSV problem is solvable
|
||||
for ( dim_t a_dim = 0; a_dim < n; ++a_dim )
|
||||
{
|
||||
a_ptr[ a_dim + (a_dim* lda) ] = a_ptr[ a_dim + (a_dim* lda) ] * T{10};
|
||||
a_ptr[ a_dim + (a_dim* lda) ] = a_ptr[ a_dim + (a_dim* lda) ] + T{RT(n)};
|
||||
}
|
||||
|
||||
// add extreme values to the X vector
|
||||
@@ -155,35 +156,6 @@ void test_trsv(
|
||||
// Test-case logger : Used to print the test-case details based on parameters
|
||||
template <typename T>
|
||||
class trsvGenericPrint {
|
||||
public:
|
||||
std::string operator()(
|
||||
testing::TestParamInfo<std::tuple<char,char,char,char,gtint_t,T,gtint_t,gtint_t>> str) const {
|
||||
char storage = std::get<0>(str.param);
|
||||
char uploa = std::get<1>(str.param);
|
||||
char transa = std::get<2>(str.param);
|
||||
char diaga = std::get<3>(str.param);
|
||||
gtint_t n = std::get<4>(str.param);
|
||||
T alpha = std::get<5>(str.param);
|
||||
gtint_t incx = std::get<6>(str.param);
|
||||
gtint_t lda_inc = std::get<7>(str.param);
|
||||
|
||||
std::string str_name = API_PRINT;
|
||||
str_name += "_stor_" + std::string(&storage, 1);
|
||||
str_name += "_uploa_" + std::string(&uploa, 1);
|
||||
str_name += "_transa_" + std::string(&transa, 1);
|
||||
str_name += "_diaga_" + std::string(&diaga, 1);
|
||||
str_name += "_n_" + std::to_string(n);
|
||||
str_name += "_alpha_" + testinghelpers::get_value_string(alpha);
|
||||
str_name += "_incx_" + testinghelpers::get_value_string(incx);
|
||||
gtint_t lda = testinghelpers::get_leading_dimension( storage, transa, n, n, lda_inc );
|
||||
str_name += "_lda_i" + std::to_string(lda_inc) + "_" + std::to_string(lda);
|
||||
return str_name;
|
||||
}
|
||||
};
|
||||
|
||||
// If strsv also gets modified to include memory testing, delete above and rename this to trsvGenericPrint.
|
||||
template <typename T>
|
||||
class trsvMemGenericPrint {
|
||||
public:
|
||||
std::string operator()(
|
||||
testing::TestParamInfo<std::tuple<char,char,char,char,gtint_t,T,gtint_t,gtint_t,bool>> str) const {
|
||||
|
||||
@@ -82,7 +82,7 @@ TEST_P( ztrsvEVT, API )
|
||||
// functionality from which we estimate operation count per element
|
||||
// of output, and hence the multipler for epsilon.
|
||||
double thresh;
|
||||
if (n == 0)
|
||||
if (n == 0 || alpha == T{0.0})
|
||||
thresh = 0.0;
|
||||
else
|
||||
if(alpha == T{1.0})
|
||||
|
||||
@@ -79,8 +79,12 @@ TEST_P( ztrsvGeneric, API )
|
||||
// of output, and hence the multipler for epsilon.
|
||||
// With adjustment for complex data.
|
||||
double thresh;
|
||||
#ifdef BLIS_INT_ELEMENT_TYPE
|
||||
double adj = 1.0;
|
||||
#else
|
||||
double adj = 2.0;
|
||||
if (n == 0)
|
||||
#endif
|
||||
if (n == 0 || alpha == T{0.0})
|
||||
thresh = 0.0;
|
||||
else
|
||||
if(alpha == T{1.0})
|
||||
@@ -94,8 +98,9 @@ TEST_P( ztrsvGeneric, API )
|
||||
test_trsv<T>( storage, uploa, transa, diaga, n, alpha, lda_inc, incx, thresh, is_mem_test );
|
||||
}
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Native,
|
||||
BlackboxSmall,
|
||||
ztrsvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
@@ -104,31 +109,50 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','c','t'), // transa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Values( gtint_t(32),
|
||||
gtint_t(24),
|
||||
gtint_t(8),
|
||||
gtint_t(4),
|
||||
gtint_t(2),
|
||||
gtint_t(1),
|
||||
gtint_t(15),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211) ), // n (random values)
|
||||
::testing::Values(dcomplex{1.0, 0.0} // APIs other than BLIS TYPED support Alpha = 1 only
|
||||
#ifdef TEST_BLIS_TYPED
|
||||
::testing::Range(gtint_t(1),gtint_t(21),1), // n
|
||||
::testing::Values(dcomplex{1.0, 0.0} // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
,dcomplex{6.1, -2.9}, dcomplex{-3.3, -1.4}
|
||||
,dcomplex{-1.0, 0.0}, dcomplex{0.0, 0.0}
|
||||
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(-153), gtint_t(-10),
|
||||
gtint_t(-2), gtint_t(-1),
|
||||
gtint_t( 1), gtint_t( 2),
|
||||
gtint_t(14), gtint_t(433)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(10), gtint_t(358)), // increment to the leading dim of a
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trsvMemGenericPrint<dcomplex>()
|
||||
::trsvGenericPrint<dcomplex>()
|
||||
);
|
||||
|
||||
// Black box testing.
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
BlackboxMedium,
|
||||
ztrsvGeneric,
|
||||
::testing::Combine(
|
||||
::testing::Values('c'
|
||||
#ifndef TEST_BLAS_LIKE
|
||||
,'r'
|
||||
#endif
|
||||
), // storage format
|
||||
::testing::Values('u','l'), // uploa
|
||||
::testing::Values('n','t','c'), // transa
|
||||
::testing::Values('n','u'), // diaga , n=NONUNIT_DIAG u=UNIT_DIAG
|
||||
::testing::Values(gtint_t(25),
|
||||
gtint_t(33),
|
||||
gtint_t(98),
|
||||
gtint_t(173),
|
||||
gtint_t(211)
|
||||
), // n
|
||||
::testing::Values(dcomplex{1.0, 0.0} // Only blis typed api supports
|
||||
#ifdef TEST_BLIS_TYPED // values of alpha other than 1
|
||||
,dcomplex{6.1, -2.9}, dcomplex{-3.3, -1.4}
|
||||
,dcomplex{-1.0, 0.0}, dcomplex{0.0, 0.0}
|
||||
#endif
|
||||
), // alpha
|
||||
::testing::Values(gtint_t(-1),gtint_t(1), gtint_t(33)), // incx
|
||||
::testing::Values(gtint_t(0), gtint_t(11)), // increment to the leading dim of a
|
||||
::testing::Values(false, true) // is memory test
|
||||
),
|
||||
::trsvGenericPrint<dcomplex>()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user