mirror of
https://github.com/amd/blis.git
synced 2026-05-14 03:02:08 +00:00
Add symbol export macro for all functions (#302)
* initial export of blis functions * Regenerate def file for master * restore bli_extern_defs exporting for now
This commit is contained in:
committed by
Devrajegowda, Kiran
parent
56286b4729
commit
e5fc00a2e7
@@ -46,34 +46,34 @@ typedef void bli_pthread_mutexattr_t;
|
||||
|
||||
#define BLIS_PTHREAD_MUTEX_INITIALIZER SRWLOCK_INIT
|
||||
|
||||
int bli_pthread_mutex_init( bli_pthread_mutex_t* mutex, const bli_pthread_mutexattr_t *attr );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_mutex_init( bli_pthread_mutex_t* mutex, const bli_pthread_mutexattr_t *attr );
|
||||
|
||||
int bli_pthread_mutex_destroy( bli_pthread_mutex_t* mutex );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_mutex_destroy( bli_pthread_mutex_t* mutex );
|
||||
|
||||
int bli_pthread_mutex_lock( bli_pthread_mutex_t* mutex );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_mutex_lock( bli_pthread_mutex_t* mutex );
|
||||
|
||||
int bli_pthread_mutex_trylock( bli_pthread_mutex_t* mutex );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_mutex_trylock( bli_pthread_mutex_t* mutex );
|
||||
|
||||
int bli_pthread_mutex_unlock( bli_pthread_mutex_t* mutex );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_mutex_unlock( bli_pthread_mutex_t* mutex );
|
||||
|
||||
typedef INIT_ONCE bli_pthread_once_t;
|
||||
|
||||
#define BLIS_PTHREAD_ONCE_INIT INIT_ONCE_STATIC_INIT
|
||||
|
||||
void bli_pthread_once( bli_pthread_once_t* once, void (*init)( void ) );
|
||||
BLIS_EXPORT_BLIS void bli_pthread_once( bli_pthread_once_t* once, void (*init)( void ) );
|
||||
|
||||
typedef CONDITION_VARIABLE bli_pthread_cond_t;
|
||||
typedef void bli_pthread_condattr_t;
|
||||
|
||||
#define BLIS_PTHREAD_COND_INITIALIZER CONDITION_VARIABLE_INIT
|
||||
|
||||
int bli_pthread_cond_init( bli_pthread_cond_t* cond, const bli_pthread_condattr_t* attr );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_cond_init( bli_pthread_cond_t* cond, const bli_pthread_condattr_t* attr );
|
||||
|
||||
int bli_pthread_cond_destroy( bli_pthread_cond_t* cond );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_cond_destroy( bli_pthread_cond_t* cond );
|
||||
|
||||
int bli_pthread_cond_wait( bli_pthread_cond_t* cond, bli_pthread_mutex_t* mutex );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_cond_wait( bli_pthread_cond_t* cond, bli_pthread_mutex_t* mutex );
|
||||
|
||||
int bli_pthread_cond_broadcast( bli_pthread_cond_t* cond );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_cond_broadcast( bli_pthread_cond_t* cond );
|
||||
typedef struct
|
||||
{
|
||||
HANDLE handle;
|
||||
@@ -82,9 +82,9 @@ typedef struct
|
||||
|
||||
typedef void bli_pthread_attr_t;
|
||||
|
||||
int bli_pthread_create( bli_pthread_t *thread, const bli_pthread_attr_t *attr, void* (*start_routine)( void* ), void *arg );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_create( bli_pthread_t *thread, const bli_pthread_attr_t *attr, void* (*start_routine)( void* ), void *arg );
|
||||
|
||||
int bli_pthread_join( bli_pthread_t thread, void **retval );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_join( bli_pthread_t thread, void **retval );
|
||||
|
||||
// barrier-related definitions
|
||||
|
||||
@@ -98,11 +98,11 @@ typedef struct
|
||||
int tripCount;
|
||||
} bli_pthread_barrier_t;
|
||||
|
||||
int bli_pthread_barrier_init( bli_pthread_barrier_t *barrier, const bli_pthread_barrierattr_t *attr, unsigned int count );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_barrier_init( bli_pthread_barrier_t *barrier, const bli_pthread_barrierattr_t *attr, unsigned int count );
|
||||
|
||||
int bli_pthread_barrier_destroy( bli_pthread_barrier_t *barrier );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_barrier_destroy( bli_pthread_barrier_t *barrier );
|
||||
|
||||
int bli_pthread_barrier_wait( bli_pthread_barrier_t *barrier );
|
||||
BLIS_EXPORT_BLIS int bli_pthread_barrier_wait( bli_pthread_barrier_t *barrier );
|
||||
|
||||
#else // !defined(_MSC_VER)
|
||||
|
||||
@@ -155,7 +155,7 @@ typedef pthread_barrierattr_t bli_pthread_barrierattr_t;
|
||||
|
||||
// -- pthread_create(), pthread_join() --
|
||||
|
||||
int bli_pthread_create
|
||||
BLIS_EXPORT_BLIS int bli_pthread_create
|
||||
(
|
||||
bli_pthread_t* thread,
|
||||
const bli_pthread_attr_t* attr,
|
||||
@@ -163,7 +163,7 @@ int bli_pthread_create
|
||||
void* arg
|
||||
);
|
||||
|
||||
int bli_pthread_join
|
||||
BLIS_EXPORT_BLIS int bli_pthread_join
|
||||
(
|
||||
bli_pthread_t thread,
|
||||
void** retval
|
||||
@@ -171,59 +171,59 @@ int bli_pthread_join
|
||||
|
||||
// -- pthread_mutex_*() --
|
||||
|
||||
int bli_pthread_mutex_init
|
||||
BLIS_EXPORT_BLIS int bli_pthread_mutex_init
|
||||
(
|
||||
bli_pthread_mutex_t* mutex,
|
||||
const bli_pthread_mutexattr_t* attr
|
||||
);
|
||||
|
||||
int bli_pthread_mutex_destroy
|
||||
BLIS_EXPORT_BLIS int bli_pthread_mutex_destroy
|
||||
(
|
||||
bli_pthread_mutex_t* mutex
|
||||
);
|
||||
|
||||
int bli_pthread_mutex_lock
|
||||
BLIS_EXPORT_BLIS int bli_pthread_mutex_lock
|
||||
(
|
||||
bli_pthread_mutex_t* mutex
|
||||
);
|
||||
|
||||
int bli_pthread_mutex_trylock
|
||||
BLIS_EXPORT_BLIS int bli_pthread_mutex_trylock
|
||||
(
|
||||
bli_pthread_mutex_t* mutex
|
||||
);
|
||||
|
||||
int bli_pthread_mutex_unlock
|
||||
BLIS_EXPORT_BLIS int bli_pthread_mutex_unlock
|
||||
(
|
||||
bli_pthread_mutex_t* mutex
|
||||
);
|
||||
|
||||
// -- pthread_cond_*() --
|
||||
|
||||
int bli_pthread_cond_init
|
||||
BLIS_EXPORT_BLIS int bli_pthread_cond_init
|
||||
(
|
||||
bli_pthread_cond_t* cond,
|
||||
const bli_pthread_condattr_t* attr
|
||||
);
|
||||
|
||||
int bli_pthread_cond_destroy
|
||||
BLIS_EXPORT_BLIS int bli_pthread_cond_destroy
|
||||
(
|
||||
bli_pthread_cond_t* cond
|
||||
);
|
||||
|
||||
int bli_pthread_cond_wait
|
||||
BLIS_EXPORT_BLIS int bli_pthread_cond_wait
|
||||
(
|
||||
bli_pthread_cond_t* cond,
|
||||
bli_pthread_mutex_t* mutex
|
||||
);
|
||||
|
||||
int bli_pthread_cond_broadcast
|
||||
BLIS_EXPORT_BLIS int bli_pthread_cond_broadcast
|
||||
(
|
||||
bli_pthread_cond_t* cond
|
||||
);
|
||||
|
||||
// -- pthread_once_*() --
|
||||
|
||||
void bli_pthread_once
|
||||
BLIS_EXPORT_BLIS void bli_pthread_once
|
||||
(
|
||||
bli_pthread_once_t* once,
|
||||
void (*init)(void)
|
||||
@@ -231,19 +231,19 @@ void bli_pthread_once
|
||||
|
||||
// -- pthread_barrier_*() --
|
||||
|
||||
int bli_pthread_barrier_init
|
||||
BLIS_EXPORT_BLIS int bli_pthread_barrier_init
|
||||
(
|
||||
bli_pthread_barrier_t* barrier,
|
||||
const bli_pthread_barrierattr_t* attr,
|
||||
unsigned int count
|
||||
);
|
||||
|
||||
int bli_pthread_barrier_destroy
|
||||
BLIS_EXPORT_BLIS int bli_pthread_barrier_destroy
|
||||
(
|
||||
bli_pthread_barrier_t* barrier
|
||||
);
|
||||
|
||||
int bli_pthread_barrier_wait
|
||||
BLIS_EXPORT_BLIS int bli_pthread_barrier_wait
|
||||
(
|
||||
bli_pthread_barrier_t* barrier
|
||||
);
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
|
||||
// thread entry point prototype.
|
||||
void* bli_l3_thread_entry( void* data_void );
|
||||
BLIS_EXPORT_BLIS void* bli_l3_thread_entry( void* data_void );
|
||||
|
||||
|
||||
// thrcomm_t query (field only)
|
||||
@@ -56,14 +56,14 @@ static dim_t bli_thrcomm_num_threads( thrcomm_t* comm )
|
||||
|
||||
|
||||
// Thread communicator prototypes.
|
||||
thrcomm_t* bli_thrcomm_create( rntm_t* rntm, dim_t n_threads );
|
||||
void bli_thrcomm_free( rntm_t* rntm, thrcomm_t* comm );
|
||||
void bli_thrcomm_init( dim_t n_threads, thrcomm_t* comm );
|
||||
void bli_thrcomm_cleanup( thrcomm_t* comm );
|
||||
void bli_thrcomm_barrier( dim_t thread_id, thrcomm_t* comm );
|
||||
void* bli_thrcomm_bcast( dim_t inside_id, void* to_send, thrcomm_t* comm );
|
||||
BLIS_EXPORT_BLIS thrcomm_t* bli_thrcomm_create( rntm_t* rntm, dim_t n_threads );
|
||||
BLIS_EXPORT_BLIS void bli_thrcomm_free( rntm_t* rntm, thrcomm_t* comm );
|
||||
BLIS_EXPORT_BLIS void bli_thrcomm_init( dim_t n_threads, thrcomm_t* comm );
|
||||
BLIS_EXPORT_BLIS void bli_thrcomm_cleanup( thrcomm_t* comm );
|
||||
BLIS_EXPORT_BLIS void bli_thrcomm_barrier( dim_t thread_id, thrcomm_t* comm );
|
||||
BLIS_EXPORT_BLIS void* bli_thrcomm_bcast( dim_t inside_id, void* to_send, thrcomm_t* comm );
|
||||
|
||||
void bli_thrcomm_barrier_atomic( dim_t thread_id, thrcomm_t* comm );
|
||||
BLIS_EXPORT_BLIS void bli_thrcomm_barrier_atomic( dim_t thread_id, thrcomm_t* comm );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -74,12 +74,12 @@ typedef struct thrcomm_s thrcomm_t;
|
||||
|
||||
// Prototypes specific to tree barriers.
|
||||
#ifdef BLIS_TREE_BARRIER
|
||||
barrier_t* bli_thrcomm_tree_barrier_create( int num_threads, int arity, barrier_t** leaves, int leaf_index );
|
||||
void bli_thrcomm_tree_barrier_free( barrier_t* barrier );
|
||||
void bli_thrcomm_tree_barrier( barrier_t* barack );
|
||||
BLIS_EXPORT_BLIS barrier_t* bli_thrcomm_tree_barrier_create( int num_threads, int arity, barrier_t** leaves, int leaf_index );
|
||||
BLIS_EXPORT_BLIS void bli_thrcomm_tree_barrier_free( barrier_t* barrier );
|
||||
BLIS_EXPORT_BLIS void bli_thrcomm_tree_barrier( barrier_t* barack );
|
||||
#endif
|
||||
|
||||
void bli_l3_thread_decorator_thread_check
|
||||
BLIS_EXPORT_BLIS void bli_l3_thread_decorator_thread_check
|
||||
(
|
||||
dim_t n_threads,
|
||||
dim_t tid,
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
#include "bli_l3_thrinfo.h"
|
||||
|
||||
// Initialization-related prototypes.
|
||||
void bli_thread_init( void );
|
||||
void bli_thread_finalize( void );
|
||||
BLIS_EXPORT_BLIS void bli_thread_init( void );
|
||||
BLIS_EXPORT_BLIS void bli_thread_finalize( void );
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define strerror_r(errno,buf,len) strerror_s(buf,len,errno)
|
||||
@@ -58,7 +58,7 @@ void bli_thread_finalize( void );
|
||||
|
||||
// Thread range-related prototypes.
|
||||
|
||||
void bli_thread_range_sub
|
||||
BLIS_EXPORT_BLIS void bli_thread_range_sub
|
||||
(
|
||||
thrinfo_t* thread,
|
||||
dim_t n,
|
||||
@@ -71,7 +71,7 @@ void bli_thread_range_sub
|
||||
#undef GENPROT
|
||||
#define GENPROT( opname ) \
|
||||
\
|
||||
siz_t PASTEMAC0( opname ) \
|
||||
BLIS_EXPORT_BLIS siz_t PASTEMAC0( opname ) \
|
||||
( \
|
||||
dir_t direct, \
|
||||
thrinfo_t* thr, \
|
||||
@@ -90,7 +90,7 @@ GENPROT( thread_range_ndim )
|
||||
#undef GENPROT
|
||||
#define GENPROT( opname ) \
|
||||
\
|
||||
siz_t PASTEMAC0( opname ) \
|
||||
BLIS_EXPORT_BLIS siz_t PASTEMAC0( opname ) \
|
||||
( \
|
||||
thrinfo_t* thr, \
|
||||
obj_t* a, \
|
||||
@@ -110,7 +110,7 @@ GENPROT( thread_range_weighted_t2b )
|
||||
GENPROT( thread_range_weighted_b2t )
|
||||
|
||||
|
||||
dim_t bli_thread_range_width_l
|
||||
BLIS_EXPORT_BLIS dim_t bli_thread_range_width_l
|
||||
(
|
||||
doff_t diagoff_j,
|
||||
dim_t m,
|
||||
@@ -122,13 +122,13 @@ dim_t bli_thread_range_width_l
|
||||
double area_per_thr,
|
||||
bool_t handle_edge_low
|
||||
);
|
||||
siz_t bli_find_area_trap_l
|
||||
BLIS_EXPORT_BLIS siz_t bli_find_area_trap_l
|
||||
(
|
||||
dim_t m,
|
||||
dim_t n,
|
||||
doff_t diagoff
|
||||
);
|
||||
siz_t bli_thread_range_weighted_sub
|
||||
BLIS_EXPORT_BLIS siz_t bli_thread_range_weighted_sub
|
||||
(
|
||||
thrinfo_t* restrict thread,
|
||||
doff_t diagoff,
|
||||
@@ -158,7 +158,7 @@ typedef void (*l3int_t)
|
||||
);
|
||||
|
||||
// Level-3 thread decorator prototype
|
||||
void bli_l3_thread_decorator
|
||||
BLIS_EXPORT_BLIS void bli_l3_thread_decorator
|
||||
(
|
||||
l3int_t func,
|
||||
opid_t family,
|
||||
@@ -182,36 +182,36 @@ typedef struct
|
||||
dim_t f;
|
||||
} bli_prime_factors_t;
|
||||
|
||||
void bli_prime_factorization(dim_t n, bli_prime_factors_t* factors);
|
||||
BLIS_EXPORT_BLIS void bli_prime_factorization(dim_t n, bli_prime_factors_t* factors);
|
||||
|
||||
dim_t bli_next_prime_factor(bli_prime_factors_t* factors);
|
||||
BLIS_EXPORT_BLIS dim_t bli_next_prime_factor(bli_prime_factors_t* factors);
|
||||
|
||||
void bli_partition_2x2(dim_t nthread, dim_t work1, dim_t work2, dim_t* nt1, dim_t* nt2);
|
||||
BLIS_EXPORT_BLIS void bli_partition_2x2(dim_t nthread, dim_t work1, dim_t work2, dim_t* nt1, dim_t* nt2);
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
dim_t bli_gcd( dim_t x, dim_t y );
|
||||
dim_t bli_lcm( dim_t x, dim_t y );
|
||||
dim_t bli_ipow( dim_t base, dim_t power );
|
||||
BLIS_EXPORT_BLIS dim_t bli_gcd( dim_t x, dim_t y );
|
||||
BLIS_EXPORT_BLIS dim_t bli_lcm( dim_t x, dim_t y );
|
||||
BLIS_EXPORT_BLIS dim_t bli_ipow( dim_t base, dim_t power );
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
dim_t bli_thread_get_env( const char* env, dim_t fallback );
|
||||
BLIS_EXPORT_BLIS dim_t bli_thread_get_env( const char* env, dim_t fallback );
|
||||
//void bli_thread_set_env( const char* env, dim_t value );
|
||||
|
||||
dim_t bli_thread_get_jc_nt( void );
|
||||
dim_t bli_thread_get_pc_nt( void );
|
||||
dim_t bli_thread_get_ic_nt( void );
|
||||
dim_t bli_thread_get_jr_nt( void );
|
||||
dim_t bli_thread_get_ir_nt( void );
|
||||
dim_t bli_thread_get_num_threads( void );
|
||||
BLIS_EXPORT_BLIS dim_t bli_thread_get_jc_nt( void );
|
||||
BLIS_EXPORT_BLIS dim_t bli_thread_get_pc_nt( void );
|
||||
BLIS_EXPORT_BLIS dim_t bli_thread_get_ic_nt( void );
|
||||
BLIS_EXPORT_BLIS dim_t bli_thread_get_jr_nt( void );
|
||||
BLIS_EXPORT_BLIS dim_t bli_thread_get_ir_nt( void );
|
||||
BLIS_EXPORT_BLIS dim_t bli_thread_get_num_threads( void );
|
||||
|
||||
void bli_thread_set_ways( dim_t jc, dim_t pc, dim_t ic, dim_t jr, dim_t ir );
|
||||
void bli_thread_set_num_threads( dim_t value );
|
||||
BLIS_EXPORT_BLIS void bli_thread_set_ways( dim_t jc, dim_t pc, dim_t ic, dim_t jr, dim_t ir );
|
||||
BLIS_EXPORT_BLIS void bli_thread_set_num_threads( dim_t value );
|
||||
|
||||
void bli_thread_init_rntm( rntm_t* rntm );
|
||||
BLIS_EXPORT_BLIS void bli_thread_init_rntm( rntm_t* rntm );
|
||||
|
||||
void bli_thread_init_rntm_from_env( rntm_t* rntm );
|
||||
BLIS_EXPORT_BLIS void bli_thread_init_rntm_from_env( rntm_t* rntm );
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ static void bli_thread_obarrier( thrinfo_t* t )
|
||||
// Prototypes for level-3 thrinfo functions not specific to any operation.
|
||||
//
|
||||
|
||||
thrinfo_t* bli_thrinfo_create
|
||||
BLIS_EXPORT_BLIS thrinfo_t* bli_thrinfo_create
|
||||
(
|
||||
rntm_t* rntm,
|
||||
thrcomm_t* ocomm,
|
||||
@@ -168,7 +168,7 @@ thrinfo_t* bli_thrinfo_create
|
||||
thrinfo_t* sub_node
|
||||
);
|
||||
|
||||
void bli_thrinfo_init
|
||||
BLIS_EXPORT_BLIS void bli_thrinfo_init
|
||||
(
|
||||
thrinfo_t* thread,
|
||||
thrcomm_t* ocomm,
|
||||
@@ -180,12 +180,12 @@ void bli_thrinfo_init
|
||||
thrinfo_t* sub_node
|
||||
);
|
||||
|
||||
void bli_thrinfo_init_single
|
||||
BLIS_EXPORT_BLIS void bli_thrinfo_init_single
|
||||
(
|
||||
thrinfo_t* thread
|
||||
);
|
||||
|
||||
void bli_thrinfo_free
|
||||
BLIS_EXPORT_BLIS void bli_thrinfo_free
|
||||
(
|
||||
rntm_t* rntm,
|
||||
thrinfo_t* thread
|
||||
|
||||
Reference in New Issue
Block a user