mirror of https://github.com/BOINC/boinc.git
API: Fix compile errors and warnings, add documentation
svn path=/trunk/boinc/; revision=24101
This commit is contained in:
parent
60b4546c75
commit
a02c37cbce
|
@ -17,6 +17,20 @@
|
|||
|
||||
// BOINC API for OpenCL
|
||||
|
||||
// The BOINC client calls the project application with the arguments:
|
||||
// --gpu_type TYPE --device N
|
||||
// where TYPE is ATI or NVIDIA, and N is the GPU number of that type
|
||||
// For example, for ATI GPU number 0, the arguments will be:
|
||||
// --gpu_type ATI --device 0
|
||||
//
|
||||
// To get the cl_device_id and cl_platform_id for the OpenCL GPU
|
||||
// asigned to your application call this function:
|
||||
// int boinc_get_opencl_ids(int argc, char** argv, cl_device_id*, cl_platform_id*);
|
||||
//
|
||||
// NOTE: You should compile and link this function as part of your
|
||||
// application; it is not included in the standard BOINC libraries.
|
||||
//
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "win_util.h"
|
||||
#else
|
||||
|
@ -32,14 +46,14 @@
|
|||
#endif
|
||||
|
||||
#include "error_numbers.h"
|
||||
#include "util.h"
|
||||
#include "str_replace.h"
|
||||
|
||||
#include "coproc.h"
|
||||
|
||||
#include "boinc_opencl.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#else
|
||||
#ifndef _WIN32
|
||||
static jmp_buf resume;
|
||||
static void segv_handler(int) {
|
||||
longjmp(resume, 1);
|
||||
|
@ -49,7 +63,6 @@ static void segv_handler(int) {
|
|||
int boinc_get_opencl_ids_aux(
|
||||
char *type, int device_num, cl_device_id* device, cl_platform_id* platform
|
||||
) {
|
||||
cl_int errnum;
|
||||
cl_platform_id platforms[MAX_OPENCL_PLATFORMS];
|
||||
cl_uint num_platforms, platform_index, num_devices;
|
||||
cl_device_id devices[MAX_COPROC_INSTANCES];
|
||||
|
|
|
@ -17,4 +17,17 @@
|
|||
|
||||
// BOINC API for OpenCL apps
|
||||
|
||||
// The BOINC client calls the project application with the arguments:
|
||||
// --gpu_type TYPE --device N
|
||||
// where TYPE is ATI or NVIDIA, and N is the GPU number of that type
|
||||
// For example, for ATI GPU number 0, the arguments will be:
|
||||
// --gpu_type ATI --device 0
|
||||
//
|
||||
// To get the cl_device_id and cl_platform_id for the OpenCL GPU
|
||||
// asigned to your application call this function:
|
||||
//
|
||||
// NOTE: You should compile and link this function as part of your
|
||||
// application; it is not included in the standard BOINC libraries.
|
||||
//
|
||||
|
||||
int boinc_get_opencl_ids(int argc, char** argv, cl_device_id*, cl_platform_id*);
|
||||
|
|
|
@ -5415,3 +5415,13 @@ Rom 31 Aug 2011
|
|||
|
||||
samples/vboxwrapper/
|
||||
vbox.cpp
|
||||
|
||||
Charlie 31 Aug 2011
|
||||
- API: Fix compile errors and warnings, add documentation in comments
|
||||
- lib: remove unnecessary #include, add needed function declarations
|
||||
|
||||
api/
|
||||
boinc_opencl.cpp,h
|
||||
lib/
|
||||
cl_boinc.h
|
||||
coproc.cpp
|
||||
|
|
|
@ -178,3 +178,24 @@ typedef cl_bitfield cl_command_queue_properties;
|
|||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
|
||||
#define CL_DEVICE_OPENCL_C_VERSION 0x103D
|
||||
|
||||
/* Platform API */
|
||||
extern cl_int
|
||||
clGetPlatformIDs(cl_uint /* num_entries */,
|
||||
cl_platform_id * /* platforms */,
|
||||
cl_uint * /* num_platforms */);
|
||||
|
||||
/* Device APIs */
|
||||
extern cl_int
|
||||
clGetDeviceIDs(cl_platform_id /* platform */,
|
||||
cl_device_type /* device_type */,
|
||||
cl_uint /* num_entries */,
|
||||
cl_device_id * /* devices */,
|
||||
cl_uint * /* num_devices */);
|
||||
|
||||
extern cl_int
|
||||
clGetDeviceInfo(cl_device_id /* device */,
|
||||
cl_device_info /* param_name */,
|
||||
size_t /* param_value_size */,
|
||||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */);
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
#include "filesys.h"
|
||||
#include "parse.h"
|
||||
#include "util.h"
|
||||
#include "str_replace.h"
|
||||
|
||||
#include "coproc.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue