thrcomm_t* bli_thrcomm_create( dim_t n_threads ) { thrcomm_t* comm = bli_malloc_intl( sizeof(thrcomm_t) ); bli_thrcomm_init( comm, n_threads ); return comm; }
//Constructors and destructors for constructors thrcomm_t* bli_thrcomm_create( rntm_t* rntm, dim_t n_threads ) { #ifdef BLIS_ENABLE_MEM_TRACING printf( "bli_thrcomm_create(): " ); #endif thrcomm_t* comm = bli_sba_acquire( rntm, sizeof( thrcomm_t ) ); bli_thrcomm_init( n_threads, comm ); return comm; }
void bli_thread_init( void ) { // If the API is already initialized, return early. if ( bli_thread_is_initialized() ) return; bli_thrcomm_init( &BLIS_SINGLE_COMM, 1 ); bli_packm_thrinfo_init_single( &BLIS_PACKM_SINGLE_THREADED ); bli_l3_thrinfo_init_single( &BLIS_GEMM_SINGLE_THREADED ); // Mark API as initialized. bli_thread_is_init = TRUE; }