diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2012-03-16 12:36:32 -0400 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2012-03-16 12:36:32 -0400 |
commit | 2327d7372e8583f3349a50a78811d77b41c0037c (patch) | |
tree | 6ed7db2255a19f8eb5e8720ec9efa2f9331d9989 | |
parent | 28852a587dc40a54ce32a63ec1a134e4ca4a57b8 (diff) |
Rename util.* to cl_util.*
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cl_simple.c | 24 | ||||
-rw-r--r-- | cl_util.c (renamed from util.c) | 4 | ||||
-rw-r--r-- | cl_util.h (renamed from util.h) | 2 | ||||
-rw-r--r-- | get_global_id_2d.c | 2 | ||||
-rw-r--r-- | hello_world.c | 22 | ||||
-rw-r--r-- | loop.c | 2 | ||||
-rw-r--r-- | math-int.c | 10 |
8 files changed, 34 insertions, 34 deletions
@@ -1,6 +1,6 @@ CFLAGS=-g -COMMON_OBJECTS = cl_simple.o util.o +COMMON_OBJECTS = cl_simple.o cl_util.o LDFLAGS = -L/usr/local/lib -lOpenCL diff --git a/cl_simple.c b/cl_simple.c index 82572ef..2752027 100644 --- a/cl_simple.c +++ b/cl_simple.c @@ -5,7 +5,7 @@ #include <string.h> #include "cl_simple.h" -#include "util.h" +#include "cl_util.h" /*============================================================================*/ /*========== DIRECT WRAPPERS =================================================*/ @@ -23,7 +23,7 @@ unsigned clSimpleCreateContext(cl_context * context, cl_device_id device_id) if (error != CL_SUCCESS) { fprintf(stderr, "clCreateContext() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); return 0; } return 1; @@ -40,7 +40,7 @@ unsigned clSimpleCreateCommandQueue(cl_command_queue * command_queue, if (error != CL_SUCCESS) { fprintf(stderr, "clCreateCommandQueue() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); return 0; } return 1; @@ -54,7 +54,7 @@ unsigned clSimpleKernelSetArg(cl_kernel kernel, cl_uint index, size_t size, error = clSetKernelArg(kernel, index, size, value); if (error != CL_SUCCESS) { - fprintf(stderr, "clSetKernelArg failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clSetKernelArg failed: %s\n", clUtilErrorString(error)); return 0; } @@ -78,7 +78,7 @@ unsigned clSimpleEnqueueNDRangeKernel(cl_command_queue command_queue, NULL); /* Event object for this event */ if (error != CL_SUCCESS) { fprintf(stderr, "clEnqueueNDRangeKernel() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); return 0; } @@ -105,7 +105,7 @@ unsigned clSimpleInitGpuDevice(cl_device_id * device_id) * found on the system */ if (error != CL_SUCCESS) { - fprintf(stderr, "clGetPlatformIDs() failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clGetPlatformIDs() failed: %s\n", clUtilErrorString(error)); return 0; } @@ -118,7 +118,7 @@ unsigned clSimpleInitGpuDevice(cl_device_id * device_id) &total_gpu_devices); if (error != CL_SUCCESS) { - fprintf(stderr, "clGetDeviceIDs() failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clGetDeviceIDs() failed: %s\n", clUtilErrorString(error)); return 0; } @@ -190,7 +190,7 @@ unsigned clSimpleCreateKernel(cl_context context, cl_device_id device_id, if (error != CL_SUCCESS) { fprintf(stderr, "clCreateProgramWithSource() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); return 0; } @@ -215,7 +215,7 @@ unsigned clSimpleCreateKernel(cl_context context, cl_device_id device_id, NULL); /* Number of bytes written to the log */ if (error != CL_SUCCESS) { fprintf(stderr, "clGetProgramBuildInfo() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); } else { fprintf(stderr, "Build Log: \n%s\n\n", build_str); } @@ -227,7 +227,7 @@ unsigned clSimpleCreateKernel(cl_context context, cl_device_id device_id, *kernel = clCreateKernel(program, kernel_name, &error); if (error != CL_SUCCESS) { - fprintf(stderr, "clCreateKernel() failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clCreateKernel() failed: %s\n", clUtilErrorString(error)); return 0; } @@ -271,7 +271,7 @@ unsigned clSimpleSetOutputBuffer(struct cl_simple_context * context, &error); /* error code */ if (error != CL_SUCCESS) { - fprintf(stderr, "clCreateBuffer() failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clCreateBuffer() failed: %s\n", clUtilErrorString(error)); return 0; } @@ -298,7 +298,7 @@ unsigned clSimpleReadOutput(struct cl_simple_context * context, void * data, if (error != CL_SUCCESS) { fprintf(stderr, "clEnqueueReadBuffer() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); return 0; } @@ -4,11 +4,11 @@ #include <stdio.h> #include <string.h> -#include "util.h" +#include "cl_util.h" #define CASE_ERR(ec) case ec: return #ec; -const char * clCheckErrorString(cl_int error) +const char * clUtilErrorString(cl_int error) { switch(error) { @@ -1,6 +1,6 @@ #ifndef UTIL_H #define UTIL_H -const char * clCheckErrorString(cl_int error); +const char * clUtilErrorString(cl_int error); #endif /* UTIL_H */ diff --git a/get_global_id_2d.c b/get_global_id_2d.c index 50b7db2..04aa309 100644 --- a/get_global_id_2d.c +++ b/get_global_id_2d.c @@ -5,7 +5,7 @@ #include <CL/cl.h> #include "cl_simple.h" -#include "util.h" +#include "cl_util.h" #define GLOBAL_DIM_X 10 #define GLOBAL_DIM_Y 10 diff --git a/hello_world.c b/hello_world.c index c6247b6..8d88ee9 100644 --- a/hello_world.c +++ b/hello_world.c @@ -42,7 +42,7 @@ int main(int argc, char ** argv) * found on the system */ if (error != CL_SUCCESS) { - fprintf(stderr, "clGetPlatformIDs() failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clGetPlatformIDs() failed: %s\n", clUtilErrorString(error)); return EXIT_FAILURE; } @@ -57,7 +57,7 @@ int main(int argc, char ** argv) &total_gpu_devices); if (error != CL_SUCCESS) { - fprintf(stderr, "clGetDeviceIDs() failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clGetDeviceIDs() failed: %s\n", clUtilErrorString(error)); return EXIT_FAILURE; } @@ -71,7 +71,7 @@ int main(int argc, char ** argv) &error); /* Error code */ if (error != CL_SUCCESS) { - fprintf(stderr, "clCreateContext() failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clCreateContext() failed: %s\n", clUtilErrorString(error)); return EXIT_FAILURE; } @@ -84,7 +84,7 @@ int main(int argc, char ** argv) if (error != CL_SUCCESS) { fprintf(stderr, "clCreateCommandQueue() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); return EXIT_FAILURE; } @@ -99,7 +99,7 @@ int main(int argc, char ** argv) if (error != CL_SUCCESS) { fprintf(stderr, "clCreateProgramWithSource() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); return EXIT_FAILURE; } @@ -123,7 +123,7 @@ int main(int argc, char ** argv) NULL); /* Number of bytes written to the log */ if (error != CL_SUCCESS) { fprintf(stderr, "clGetProgramBuildInfo() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); } else { fprintf(stderr, "Build Log: \n%s\n\n", build_str); } @@ -135,7 +135,7 @@ int main(int argc, char ** argv) kernel = clCreateKernel(program, "pi", &error); if (error != CL_SUCCESS) { - fprintf(stderr, "clCreateKernel() failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clCreateKernel() failed: %s\n", clUtilErrorString(error)); return EXIT_FAILURE; } @@ -148,7 +148,7 @@ int main(int argc, char ** argv) &error); /* error code */ if (error != CL_SUCCESS) { - fprintf(stderr, "clCreateBuffer() failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clCreateBuffer() failed: %s\n", clUtilErrorString(error)); return EXIT_FAILURE; } @@ -160,7 +160,7 @@ int main(int argc, char ** argv) &out_buffer); if (error != CL_SUCCESS) { - fprintf(stderr, "clSetKernelArg failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clSetKernelArg failed: %s\n", clUtilErrorString(error)); return EXIT_FAILURE; } @@ -179,7 +179,7 @@ int main(int argc, char ** argv) if (error != CL_SUCCESS) { fprintf(stderr, "clEnqueueNDRangeKernel() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); return EXIT_FAILURE; } @@ -198,7 +198,7 @@ int main(int argc, char ** argv) if (error != CL_SUCCESS) { fprintf(stderr, "clEnqueueReadBuffer() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); return EXIT_FAILURE; } @@ -5,7 +5,7 @@ #include <CL/cl.h> #include "cl_simple.h" -#include "util.h" +#include "cl_util.h" int main (int argc, char ** argv) { @@ -38,7 +38,7 @@ int main(int argc, char ** argv) &error); /* Error code */ if (error != CL_SUCCESS) { - fprintf(stderr, "clCreateContext() failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clCreateContext() failed: %s\n", clUtilErrorString(error)); return EXIT_FAILURE; } @@ -51,7 +51,7 @@ int main(int argc, char ** argv) if (error != CL_SUCCESS) { fprintf(stderr, "clCreateCommandQueue() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); return EXIT_FAILURE; } @@ -68,7 +68,7 @@ int main(int argc, char ** argv) &error); /* error code */ if (error != CL_SUCCESS) { - fprintf(stderr, "clCreateBuffer() failed: %s\n", clCheckErrorString(error)); + fprintf(stderr, "clCreateBuffer() failed: %s\n", clUtilErrorString(error)); return EXIT_FAILURE; } @@ -92,7 +92,7 @@ int main(int argc, char ** argv) if (error != CL_SUCCESS) { fprintf(stderr, "clEnqueueNDRangeKernel() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); return EXIT_FAILURE; } @@ -111,7 +111,7 @@ int main(int argc, char ** argv) if (error != CL_SUCCESS) { fprintf(stderr, "clEnqueueReadBuffer() failed: %s\n", - clCheckErrorString(error)); + clUtilErrorString(error)); return EXIT_FAILURE; } |