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 
13 #ifdef BLIS1_ENABLE_USE_OF_FLA_MALLOC
14   #include "FLAME.h"
15   #define BLIS1_MALLOC FLA_malloc
16 #else
17   #define BLIS1_MALLOC malloc
18 #endif
19 
bl1_vallocm(unsigned int m,unsigned int n,unsigned int elem_size)20 void*     bl1_vallocm( unsigned int m, unsigned int n, unsigned int elem_size )
21 {
22 	return ( void* ) BLIS1_MALLOC( m * n * elem_size );
23 }
24 
bl1_iallocm(unsigned int m,unsigned int n)25 int*      bl1_iallocm( unsigned int m, unsigned int n )
26 {
27 	return ( int* ) BLIS1_MALLOC( m * n * sizeof( int ) );
28 }
29 
bl1_sallocm(unsigned int m,unsigned int n)30 float*    bl1_sallocm( unsigned int m, unsigned int n )
31 {
32 	return ( float* ) BLIS1_MALLOC( m * n * sizeof( float ) );
33 }
34 
bl1_dallocm(unsigned int m,unsigned int n)35 double*   bl1_dallocm( unsigned int m, unsigned int n )
36 {
37 	return ( double* ) BLIS1_MALLOC( m * n * sizeof( double ) );
38 }
39 
bl1_callocm(unsigned int m,unsigned int n)40 scomplex* bl1_callocm( unsigned int m, unsigned int n )
41 {
42 	return ( scomplex* ) BLIS1_MALLOC( m * n * sizeof( scomplex ) );
43 }
44 
bl1_zallocm(unsigned int m,unsigned int n)45 dcomplex* bl1_zallocm( unsigned int m, unsigned int n )
46 {
47 	return ( dcomplex* ) BLIS1_MALLOC( m * n * sizeof( dcomplex ) );
48 }
49 
50