Adapt utests for builds supportin only some variable types
This commit is contained in:
parent
ac653c94f3
commit
63d7dad04c
|
@ -32,7 +32,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
**********************************************************************************/
|
||||
|
||||
#include "openblas_utest.h"
|
||||
|
||||
#if defined(BUILD_SINGLE) && defined(BUILD_DOUBLE)
|
||||
CTEST(dsdot,dsdot_n_1)
|
||||
{
|
||||
float x= 0.172555164F;
|
||||
|
@ -47,17 +47,4 @@ CTEST(dsdot,dsdot_n_1)
|
|||
ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS);
|
||||
|
||||
}
|
||||
|
||||
CTEST(dsdot,dsdot_n_2)
|
||||
{
|
||||
float x[] = {0.1F, 0.2F, 0.3F, 0.4F, 0.5F, 0.6F, 0.7F, 0.8F};
|
||||
float y[] = {0.1F, 0.2F, 0.3F, 0.4F, 0.5F, 0.6F, 0.7F, 0.8F};
|
||||
blasint incx=1;
|
||||
blasint incy=1;
|
||||
blasint n=8;
|
||||
|
||||
double res1=0.0f, res2= 2.0400000444054616;
|
||||
|
||||
res1=BLASFUNC(dsdot)(&n, &x, &incx, &y, &incy);
|
||||
ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -48,6 +48,7 @@ void* xmalloc(size_t n)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef BUILD_DOUBLE
|
||||
void check_dgemm(double *a, double *b, double *result, double *expected, blasint n)
|
||||
{
|
||||
char trans1 = 'T';
|
||||
|
@ -59,9 +60,13 @@ void check_dgemm(double *a, double *b, double *result, double *expected, blasint
|
|||
ASSERT_DBL_NEAR_TOL(expected[i], result[i], DOUBLE_EPS);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
CTEST(fork, safety)
|
||||
{
|
||||
#ifndef BUILD_DOUBLE
|
||||
exit(0);
|
||||
#else
|
||||
blasint n = 1000;
|
||||
int i;
|
||||
|
||||
|
@ -124,4 +129,5 @@ CTEST(fork, safety)
|
|||
ASSERT_EQUAL(wait_pid, fork_pid);
|
||||
ASSERT_EQUAL(0, WEXITSTATUS (child_status));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue