mirror of
https://github.com/amd/blis.git
synced 2026-05-04 06:21:12 +00:00
Added GTestSuite helper functions
- Functions to convert to cblas enums from char. - Functions to print matrix and vector elements. - Functions to set matrix and vector elements with the given value. AMD-Internal: [CPUPL-2732] Change-Id: I1046b9578c8456e89eddba4a4e8577016b9361ca
This commit is contained in:
committed by
Eleni Vlachopoulou
parent
6b8f4744a4
commit
f164c7fe70
@@ -62,14 +62,14 @@ bool operator== (const dcomplex x, const dcomplex y);
|
||||
bool operator!= (const scomplex x, const scomplex y);
|
||||
bool operator!= (const dcomplex x, const dcomplex y);
|
||||
|
||||
// Since we may only specialise template functions and classes
|
||||
// in the std namespace for custom types, and std::to_string is not
|
||||
// Since we may only specialise template functions and classes
|
||||
// in the std namespace for custom types, and std::to_string is not
|
||||
// a template function, we put to_string into our namespace.
|
||||
namespace testinghelpers {
|
||||
template<typename T>
|
||||
template<typename T>
|
||||
std::string to_string(const T& x) {
|
||||
if constexpr (testinghelpers::type_info<T>::is_complex)
|
||||
{
|
||||
{
|
||||
std::string ss = "(" + std::to_string(x.real) + ", " + std::to_string(x.imag) + ")";
|
||||
return ss;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user