@@ -13,9 +13,9 @@ modification, are permitted provided that the following conditions are
1313 notice, this list of conditions and the following disclaimer in
1414 the documentation and/or other materials provided with the
1515 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
1919 permission.
2020
2121THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
@@ -48,19 +48,21 @@ void* xmalloc(size_t n)
4848 }
4949}
5050
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 )
5252{
53+ char trans1 = 'T' ;
54+ char trans2 = 'N' ;
55+ double zerod = 0 , oned = 1 ;
5356 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 );
5658 for (i = 0 ; i < n * n ; ++ i ) {
5759 ASSERT_DBL_NEAR_TOL (expected [i ], result [i ], DOUBLE_EPS );
5860 }
5961}
6062
6163CTEST (fork , safety )
6264{
63- int n = 1000 ;
65+ blasint n = 1000 ;
6466 int i ;
6567
6668 double * a , * b , * c , * d ;
@@ -84,8 +86,10 @@ CTEST(fork, safety)
8486
8587 // Compute a DGEMM product in the parent process prior to forking to
8688 // 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 );
8993
9094 fork_pid = fork ();
9195 if (fork_pid == -1 ) {
0 commit comments