@@ -13,9 +13,9 @@ modification, are permitted provided that the following conditions are
13
13
notice, this list of conditions and the following disclaimer in
14
14
the documentation and/or other materials provided with the
15
15
distribution.
16
- 3. Neither the name of the OpenBLAS project nor the names of
17
- its contributors may be used to endorse or promote products
18
- derived from this software without specific prior written
16
+ 3. Neither the name of the OpenBLAS project nor the names of
17
+ its contributors may be used to endorse or promote products
18
+ derived from this software without specific prior written
19
19
permission.
20
20
21
21
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
@@ -48,19 +48,21 @@ void* xmalloc(size_t n)
48
48
}
49
49
}
50
50
51
- void check_dgemm (double * a , double * b , double * result , double * expected , int n )
51
+ void check_dgemm (double * a , double * b , double * result , double * expected , blasint n )
52
52
{
53
+ char trans1 = 'T' ;
54
+ char trans2 = 'N' ;
55
+ double zerod = 0 , oned = 1 ;
53
56
int i ;
54
- cblas_dgemm (CblasRowMajor , CblasNoTrans , CblasNoTrans , n , n , n ,
55
- 1.0 , a , n , b , n , 0.0 , result , n );
57
+ BLASFUNC (dgemm )(& trans1 , & trans2 , & n , & n , & n , & oned , a , & n , b , & n , & zerod , result , & n );
56
58
for (i = 0 ; i < n * n ; ++ i ) {
57
59
ASSERT_DBL_NEAR_TOL (expected [i ], result [i ], DOUBLE_EPS );
58
60
}
59
61
}
60
62
61
63
CTEST (fork , safety )
62
64
{
63
- int n = 1000 ;
65
+ blasint n = 1000 ;
64
66
int i ;
65
67
66
68
double * a , * b , * c , * d ;
@@ -84,8 +86,10 @@ CTEST(fork, safety)
84
86
85
87
// Compute a DGEMM product in the parent process prior to forking to
86
88
// ensure that the OpenBLAS thread pool is initialized.
87
- cblas_dgemm (CblasRowMajor , CblasNoTrans , CblasNoTrans , n , n , n ,
88
- 1.0 , a , n , b , n , 0.0 , c , n );
89
+ char trans1 = 'T' ;
90
+ char trans2 = 'N' ;
91
+ double zerod = 0 , oned = 1 ;
92
+ BLASFUNC (dgemm )(& trans1 , & trans2 , & n , & n , & n , & oned , a , & n , b , & n , & zerod , c , & n );
89
93
90
94
fork_pid = fork ();
91
95
if (fork_pid == -1 ) {
0 commit comments