aboutsummaryrefslogtreecommitdiff
path: root/redist
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-03-17 14:12:34 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-03-17 14:13:34 -0600
commite2db23ea8401ea8a3e608c3ec4d84423e09047f9 (patch)
treeefbf9ab25149e3be634e9f63ce2cc96333bd8e3d /redist
parent4cb248d46808c07f029c0c595af8f14517925816 (diff)
downloadlibsurvive-e2db23ea8401ea8a3e608c3ec4d84423e09047f9.tar.gz
libsurvive-e2db23ea8401ea8a3e608c3ec4d84423e09047f9.tar.bz2
Added assert clause to test
Diffstat (limited to 'redist')
-rw-r--r--redist/test_dcl.c11
1 files changed, 6 insertions, 5 deletions
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()