mirror of
https://github.com/amd/blis.git
synced 2026-05-04 22:41:11 +00:00
Introducing upgrated BLIS GTestSuite.
Key features: - able to test both static and dynamic libraries - able to test BLAS, CBLAS and BLIS-typed interface - can use any CBLAS library for reference results - can build and/or run tests depending on the BLAS level or a specific API AMD-Internal: [CPUPL-2732] Change-Id: Ibe0d7938e06081526bbc54d3182ac7d17affdaf6
This commit is contained in:
29
gtestsuite/testinghelpers/inc/common/complex_helpers.h
Normal file
29
gtestsuite/testinghelpers/inc/common/complex_helpers.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include "common/type_info.h"
|
||||
|
||||
namespace std {
|
||||
// Overload std::abs to work with scomplex and dcomplex.
|
||||
float abs(const scomplex x);
|
||||
double abs(const dcomplex x);
|
||||
// Overload the stream operator to be able to print scomplex in error messages.
|
||||
ostream& operator<<(ostream& os, const scomplex& x);
|
||||
ostream& operator<<(ostream& os, const dcomplex& x);
|
||||
}
|
||||
|
||||
// Operator overloading for scomplex and dcomplex types.
|
||||
scomplex operator+(const scomplex x, const scomplex y);
|
||||
dcomplex operator+(const dcomplex x, const dcomplex y);
|
||||
|
||||
scomplex operator-(const scomplex x, const scomplex y);
|
||||
dcomplex operator-(const dcomplex x, const dcomplex y);
|
||||
|
||||
scomplex operator*(const scomplex x, const scomplex y);
|
||||
dcomplex operator*(const dcomplex x, const dcomplex y);
|
||||
|
||||
bool operator== (const scomplex x, const scomplex y);
|
||||
bool operator== (const dcomplex x, const dcomplex y);
|
||||
|
||||
bool operator!= (const scomplex x, const scomplex y);
|
||||
bool operator!= (const dcomplex x, const dcomplex y);
|
||||
Reference in New Issue
Block a user