useDynLib(R_OpenCL, cl_create_buffer, cl_get_buffer_length,
  cl_read_buffer, cl_write_buffer, ocl_context, ocl_devices,
  ocl_ez_kernel, ocl_get_device_info, ocl_get_platform_info,
  ocl_platforms, ocl_call, ocl_mem_limits, cl_supported_index,
  ocl_get_device_info_entry)
exportPattern("^ocl[A-Z]+")
exportPattern("clBuffer$")
exportPattern("clLocal$")

S3method(print, clDeviceID)
S3method(print, clPlatformID)
S3method(print, clContext)
S3method(print, clCommandQueue)
S3method(print, clKernel)
S3method(names, clKernel)
S3method(`$`, clKernel)
S3method(`$<-`, clKernel)

S3method(print, clBuffer)
S3method(as.double, clBuffer)
S3method(as.integer, clBuffer)
S3method(length, clBuffer)
S3method(`[`, clBuffer)
S3method(`[<-`, clBuffer)

S3method(print, clLocal)
S3method(length, clLocal)

S3method(oclInfo, clDeviceID)
S3method(oclInfo, clPlatformID)
S3method(oclInfo, list)
