kernelBufferPtr[i] = (float)kernel->values[i];
imageKernelBuffer=CreateOpenCLBuffer(device,CL_MEM_COPY_HOST_PTR |
CL_MEM_READ_ONLY,kernel->width*sizeof(*kernelBufferPtr),kernelBufferPtr);
- *width=kernel->width;
+ *width=(cl_uint) kernel->width;
kernelBufferPtr=(float *) RelinquishMagickMemory(kernelBufferPtr);
kernel=DestroyKernelInfo(kernel);
if (imageKernelBuffer == (cl_mem) NULL)
break;
};
if (GetPixelRedTraits(image) != UndefinedPixelTrait)
- numRandomNumberPerPixel+=numRandPerChannel;
+ numRandomNumberPerPixel+=(cl_uint) numRandPerChannel;
if (GetPixelGreenTraits(image) != UndefinedPixelTrait)
- numRandomNumberPerPixel+=numRandPerChannel;
+ numRandomNumberPerPixel+=(cl_uint) numRandPerChannel;
if (GetPixelBlueTraits(image) != UndefinedPixelTrait)
- numRandomNumberPerPixel+=numRandPerChannel;
+ numRandomNumberPerPixel+=(cl_uint) numRandPerChannel;
if (GetPixelAlphaTraits(image) != UndefinedPixelTrait)
- numRandomNumberPerPixel+=numRandPerChannel;
+ numRandomNumberPerPixel+=(cl_uint) numRandPerChannel;
addNoiseKernel=AcquireOpenCLKernel(device,"AddNoise");
if (addNoiseKernel == (cl_kernel) NULL)
AcquireOpenCLCommandQueue(MagickCLDevice);
extern MagickPrivate cl_int
- SetOpenCLKernelArg(cl_kernel,cl_uint,size_t,const void *);
+ SetOpenCLKernelArg(cl_kernel,size_t,size_t,const void *);
extern MagickPrivate cl_kernel
AcquireOpenCLKernel(MagickCLDevice,const char *);
(void) openCL_library->clReleaseMemObject(memobj);
}
-MagickPrivate cl_int SetOpenCLKernelArg(cl_kernel kernel,cl_uint arg_index,
+MagickPrivate cl_int SetOpenCLKernelArg(cl_kernel kernel,size_t arg_index,
size_t arg_size,const void *arg_value)
{
- return(openCL_library->clSetKernelArg(kernel,arg_index,arg_size,arg_value));
+ return(openCL_library->clSetKernelArg(kernel,(cl_uint) arg_index,arg_size,
+ arg_value));
}
/*
continue;
status=clEnv->library->clGetDeviceIDs(platforms[i],CL_DEVICE_TYPE_CPU |
- CL_DEVICE_TYPE_GPU,clEnv->number_devices,devices,&number_devices);
+ CL_DEVICE_TYPE_GPU,(cl_uint) clEnv->number_devices,devices,&number_devices);
if (status != CL_SUCCESS)
continue;