| | |
| | | #include <time.h> |
| | | #include "list.h" |
| | | |
| | | #if defined(_MSC_VER) && _MSC_VER < 1900 |
| | | #define snprintf(buf,len, format,...) _snprintf_s(buf, len,len, format, __VA_ARGS__) |
| | | #endif |
| | | |
| | | #define SECRET_NUM -1234 |
| | | #define TWO_PI 6.2831853071795864769252866 |
| | | |
| | | #ifdef YOLODLL_EXPORTS |
| | | #if defined(_MSC_VER) |
| | | #define YOLODLL_API __declspec(dllexport) |
| | | #else |
| | | #define YOLODLL_API __attribute__((visibility("default"))) |
| | | #endif |
| | | #else |
| | | #if defined(_MSC_VER) |
| | | #define YOLODLL_API |
| | | #else |
| | | #define YOLODLL_API |
| | | #endif |
| | | #endif |
| | | |
| | | double what_time_is_it_now(); |
| | | int *read_map(char *filename); |
| | | void shuffle(void *arr, size_t n, size_t size); |
| | | void sorta_shuffle(void *arr, size_t n, size_t size, size_t sections); |
| | | void free_ptrs(void **ptrs, int n); |
| | | YOLODLL_API void free_ptrs(void **ptrs, int n); |
| | | char *basecfg(char *cfgfile); |
| | | int alphanum_to_int(char c); |
| | | char int_to_alphanum(int i); |
| | |
| | | int read_all_fail(int fd, char *buffer, size_t bytes); |
| | | int write_all_fail(int fd, char *buffer, size_t bytes); |
| | | void find_replace(char *str, char *orig, char *rep, char *output); |
| | | void replace_image_to_label(char *input_path, char *output_path); |
| | | void error(const char *s); |
| | | void malloc_error(); |
| | | void file_error(char *s); |
| | | void strip(char *s); |
| | | void strip_args(char *s); |
| | | void strip_char(char *s, char bad); |
| | | void top_k(float *a, int n, int k, int *index); |
| | | list *split_str(char *s, char delim); |
| | |
| | | char *find_char_arg(int argc, char **argv, char *arg, char *def); |
| | | int sample_array(float *a, int n); |
| | | void print_statistics(float *a, int n); |
| | | unsigned int random_gen(); |
| | | float random_float(); |
| | | float rand_uniform_strong(float min, float max); |
| | | int int_index(int *a, int val, int n); |
| | | |
| | | #endif |
| | | |