1 /*
2 
3     Copyright (C) 2014, The University of Texas at Austin
4 
5     This file is part of libflame and is available under the 3-Clause
6     BSD license, which can be found in the LICENSE file at the top-level
7     directory, or at http://opensource.org/licenses/BSD-3-Clause
8 
9 */
10 
11 #include "blis1.h"
12 
bl1_srands(float * alpha)13 void bl1_srands( float* alpha )
14 {
15 	*alpha = ( float ) ( ( double ) rand() / ( ( double ) RAND_MAX / 2.0F ) ) - 1.0F;
16 }
17 
bl1_drands(double * alpha)18 void bl1_drands( double* alpha )
19 {
20 	*alpha = ( ( double ) rand() / ( ( double ) RAND_MAX / 2.0 ) ) - 1.0;
21 }
22 
bl1_crands(scomplex * alpha)23 void bl1_crands( scomplex* alpha )
24 {
25 	bl1_srands( &(alpha->real) );
26 	bl1_srands( &(alpha->imag) );
27 }
28 
bl1_zrands(dcomplex * alpha)29 void bl1_zrands( dcomplex* alpha )
30 {
31 	bl1_drands( &(alpha->real) );
32 	bl1_drands( &(alpha->imag) );
33 }
34 
35