From e2db23ea8401ea8a3e608c3ec4d84423e09047f9 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Sat, 17 Mar 2018 14:12:34 -0600 Subject: Added assert clause to test --- redist/test_dcl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'redist') diff --git a/redist/test_dcl.c b/redist/test_dcl.c index 68a6129..ce7f3de 100644 --- a/redist/test_dcl.c +++ b/redist/test_dcl.c @@ -42,11 +42,6 @@ void compareToCblas() { cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, m, n, k, 1.0, DMS(em1), DMS(em2), .1, DMS(emo[z])); } - /*void cblas_dgemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA, - CBLAS_TRANSPOSE TransB, const int M, const int N, - const int K, const double alpha, const double *A, - const int lda, const double *B, const int ldb, - const double beta, double *C, const int ldc);*/ } printf("%s Elapsed: %f\n", z ? "CBlas" : "dcl", times[z] = OGGetAbsoluteTime() - start); @@ -54,6 +49,12 @@ void compareToCblas() { printf("%fx difference\n", times[0] / times[1]); dclPrint(emo[0][0], 12, 20, 12); dclPrint(emo[1][0], 12, 20, 12); + + for (int i = 0; i < m; i++) { + for (int j = 0; j < k; j++) { + assert(fabs(emo[0][i][j] - emo[1][i][j]) < .00001); + } + } } int main() -- cgit v1.2.3