dev_errors.h 639 Bytes
/*
 * dev_errors.h
 *
 *  Created on: 15/11/2014
 *      Author: Pedro
 */

#ifndef SRC_UTILS_DEV_ERRORS_H_
#define SRC_UTILS_DEV_ERRORS_H_

#include "CL/cl.h"
#include "CL/cl_platform.h"

#include "../config.h"

#if RUN_IN_CUDA
#include <cuda.h>
#include <builtin_types.h>
void cuda_check_error(CUresult ret, const char* operation, char* dev_name);
#endif

void cl_check_error(cl_int ret, const char *operation, char *dev_name);
void cl_check_build_error(cl_int ret, cl_program *prog, cl_device_id *device_id, char *dev_name);
const char* cl_get_err_str(cl_int error_code);

#endif /* SRC_UTILS_DEV_ERRORS_H_ */