int pocl_cache_device_cachedir_exists(cl_program program,
unsigned device_i);
+POCL_EXPORT
int pocl_cache_write_descriptor(cl_program program,
unsigned device_i,
const char* kernel_name,
const char* content,
size_t size);
+POCL_EXPORT
void pocl_cache_kernel_cachedir_path (char *kernel_cachedir_path,
cl_program program, unsigned device_i,
cl_kernel kernel, const char *append_str,
int pocl_rm_rf(const char* path);
/* Make a directory, including all directories along path */
+POCL_EXPORT
int pocl_mkdir_p(const char* path);
/* Remove a file or empty directory */
int pocl_remove(const char* path);
+POCL_EXPORT
int pocl_rename(const char *oldpath, const char *newpath);
POCL_EXPORT
int pocl_mk_tempdir (char *output, const char *prefix);
+POCL_EXPORT
int pocl_mk_tempname (char *output, const char *prefix, const char *suffix,
int *ret_fd);
POCL_EXPORT
extern void pocl_debug_print_header (const char * func, unsigned line,
const char* filter, int filter_type);
+POCL_EXPORT
extern void pocl_debug_measure_start (uint64_t* start);
+POCL_EXPORT
extern void pocl_debug_measure_finish (uint64_t* start, uint64_t* finish,
const char* msg,
const char *func,
#ifndef POCL_HASH_H
#define POCL_HASH_H
+#include "pocl_export.h"
+
#ifdef __cplusplus
extern "C" {
#endif
#define SHA1_DIGEST_SIZE 20
+POCL_EXPORT
void pocl_SHA1_Init(SHA1_CTX* context);
+POCL_EXPORT
void pocl_SHA1_Update(SHA1_CTX* context, const uint8_t* data, const size_t len);
+POCL_EXPORT
void pocl_SHA1_Final(SHA1_CTX* context, uint8_t digest[SHA1_DIGEST_SIZE]);
#ifdef __cplusplus
extern "C" {
#endif
+POCL_EXPORT
int pocl_is_option_set(const char *key);
POCL_EXPORT
int pocl_get_int_option(const char *key, int default_value);
void pocl_install_sigusr2_handler ();
/* Finds the next highest power of two of the given value. */
+POCL_EXPORT
size_t pocl_size_ceil2 (size_t x);
uint64_t pocl_size_ceil2_64 (uint64_t x);