#include <libltdl/ltdl.h>
Go to the source code of this file.
Typedefs | |
typedef lt_dlhandle | oski_modhandle_t |
Handle to a shared library module. | |
typedef oski_id_t(* | oski_register_funcpt )(const char *, oski_id_t, oski_id_t) |
Module registration routine. | |
Functions | |
int | oski_InitModuleLoader (void) |
Initialize the dynamic/shared library loader. | |
void | oski_CloseModuleLoader (void) |
Shutdown the dynamic/shared library loader. | |
oski_modhandle_t | oski_LoadModule (const char *name) |
Load a library module. | |
oski_modhandle_t | oski_LoadModuleOptional (const char *name) |
Load a library module, but do not call the error handler if the module does not exist. | |
void | oski_CallModuleInit (oski_modhandle_t module) |
Execute a loaded module's initialization code, if any. | |
void | oski_CloseModule (oski_modhandle_t module) |
Execute a loaded module's shutdown code, if any. | |
int | oski_UnloadModule (oski_modhandle_t module) |
Unload a library module. | |
void * | oski_LookupModuleMethod (const oski_modhandle_t module, const char *method_name) |
Find a routine within a shared library module. | |
char * | oski_MakeModuleDesc (const char *name, oski_id_t ind, oski_id_t val) |
Returns a newly allocated NULL-terminated string describing the matrix type, used primarily for debugging purposes. | |
char * | oski_MakeModuleName (const char *mod_type_name, const char *name, oski_id_t ind, oski_id_t val) |
Returns a newly allocated NULL-terminated string specifying the shared library module name for the indicated matrix type. | |
int | oski_RegisterSiteModules (const char *file, const char *mod_type_name, oski_register_funcpt func) |
Load site modules. |
To prevent our users' dependence on our use of libltdl this file must be explicitly included by a source file when needed.
int oski_InitModuleLoader | ( | void | ) |
Initialize the dynamic/shared library loader.
References ERR_INIT_SHAREDLIB, oski_HandleError, oski_InitModuleLoader(), and oski_PrintDebugMessage().
Referenced by oski_Init(), and oski_InitModuleLoader().
oski_modhandle_t oski_LoadModule | ( | const char * | modname | ) |
Load a library module.
[in] | modname | Name of shared library module to load. |
References ERR_LOAD_MOD, oski_HandleError, oski_LoadModule(), and oski_LoadModuleOptional().
Referenced by BCSR_GetKernel(), MBCSR_GetSubmatKernel(), and oski_LoadModule().
oski_modhandle_t oski_LoadModuleOptional | ( | const char * | modname | ) |
Load a library module, but do not call the error handler if the module does not exist.
[in] | modname | Name of shared library module to load. |
References oski_CallModuleInit(), oski_LoadModuleOptional(), and oski_PrintDebugMessage().
Referenced by oski_LoadModule(), oski_LoadModuleOptional(), oski_RegisterHeur(), and oski_RegisterMatType().
void* oski_LookupModuleMethod | ( | const oski_modhandle_t | module, | |
const char * | method_name | |||
) |
Find a routine within a shared library module.
Find a routine within a shared library module.
[in] | module | Module pointer. |
[in] | method_name | Name of the method (routine) to find. |
References oski_LookupModuleMethod().
Referenced by BCSR_GetKernel(), MBCSR_GetSubmatKernel(), oski_LookupHeurIdMethod(), oski_LookupMatTypeIdMethod(), and oski_LookupModuleMethod().
Returns a newly allocated NULL-terminated string describing the matrix type, used primarily for debugging purposes.
Returns a newly allocated NULL-terminated string describing the matrix type, used primarily for debugging purposes.
References oski_GetScalarIndexName(), oski_GetScalarValueName(), oski_MakeModuleDesc(), and oski_StringPrintf().
Referenced by oski_MakeModuleDesc(), oski_RegisterHeur(), and oski_RegisterMatType().
char* oski_MakeModuleName | ( | const char * | mod_type_name, | |
const char * | name, | |||
oski_id_t | ind, | |||
oski_id_t | val | |||
) |
Returns a newly allocated NULL-terminated string specifying the shared library module name for the indicated matrix type.
Returns a newly allocated NULL-terminated string specifying the shared library module name for the indicated matrix type.
References oski_GetScalarIndexTag(), oski_GetScalarValueTag(), oski_MakeModuleName(), and oski_StringPrintf().
Referenced by oski_CreateMatReprFromCSR(), oski_MakeModuleName(), oski_RegisterHeur(), oski_RegisterMatType(), and SetModuleName().
int oski_RegisterSiteModules | ( | const char * | filebase, | |
const char * | mod_type_name, | |||
oski_register_funcpt | func | |||
) |
Load site modules.
References oski_PrintDebugMessage(), and oski_RegisterSiteModules().
Referenced by oski_RegisterSiteModules().
int oski_UnloadModule | ( | oski_modhandle_t | module | ) |
Unload a library module.
References ERR_UNLOAD_MOD, oski_HandleError, oski_PrintDebugMessage(), and oski_UnloadModule().
Referenced by oski_UnloadModule().