24 #ifdef TRACE_MEMORY_ALLOCS
30 #include <google/protobuf/stubs/common.h>
54 void init_shogun(
void (*print_message)(FILE* target,
const char* str),
55 void (*print_warning)(FILE* target,
const char* str),
56 void (*print_error)(FILE* target,
const char* str),
57 void (*cancel_computations)(
bool &delayed,
bool &immediately))
69 #ifdef TRACE_MEMORY_ALLOCS
91 fprintf(target,
"%s", str);
102 #ifdef TRACE_MEMORY_ALLOCS
103 list_memory_allocs();
120 ::google::protobuf::ShutdownProtobufLibrary();
141 sg_parallel=parallel;
191 char* env_log_val = NULL;
193 env_log_val = getenv(
"SHOGUN_LOG_LEVEL");
196 if(strncmp(env_log_val,
"DEBUG", 5) == 0)
198 else if(strncmp(env_log_val,
"WARN", 4) == 0)
200 else if(strncmp(env_log_val,
"ERROR", 5) == 0)
void init_shogun(void(*print_message)(FILE *target, const char *str), void(*print_warning)(FILE *target, const char *str), void(*print_error)(FILE *target, const char *str), void(*cancel_computations)(bool &delayed, bool &immediately))
void set_loglevel(EMessageType level)
void set_global_version(Version *version)
void set_global_math(CMath *math)
void(* sg_print_warning)(FILE *target, const char *str)
function called to print warning messages
void init_shogun_with_defaults()
CMath * get_global_math()
void(* sg_print_error)(FILE *target, const char *str)
function called to print error messages
Parallel * get_global_parallel()
void(* sg_cancel_computations)(bool &delayed, bool &immediately)
function called to cancel things
Class Version provides version information.
void set_global_parallel(Parallel *parallel)
void(* sg_print_message)(FILE *target, const char *str)
function called to print normal messages
: Pseudo random number geneartor
Class Parallel provides helper functions for multithreading.
all of classes and functions are contained in the shogun namespace
Version * get_global_version()
Class which collects generic mathematical functions.
void set_global_rand(CRandom *rand)
void sg_global_print_default(FILE *target, const char *str)
void set_global_io(SGIO *io)
Class SGIO, used to do input output operations throughout shogun.
CRandom * get_global_rand()
the class CMap, a map based on the hash-table. w: http://en.wikipedia.org/wiki/Hash_table ...