Beispiel #1
0
        public static CLCommandQueueHandle CreateCommandQueuetWrapper(CLContextHandle context, CLDeviceHandle device, ComputeCommandQueueFlags properties)
        {
            var handle = CreateCommandQueue(context, device, properties, out ComputeErrorCode errcode_ret);

            ComputeException.ThrowOnError(errcode_ret);
            return(handle);
        }
Beispiel #2
0
 public extern static CLProgramHandle CreateProgramWithBuiltInKernels(
     CLContextHandle context,
     Int32 num_devices,
     [MarshalAs(UnmanagedType.LPArray)] CLDeviceHandle[] device_list,
     String kernel_names,
     [MarshalAs(UnmanagedType.LPArray)] IntPtr[] lengths,
     out ComputeErrorCode errcode_ret);
Beispiel #3
0
        public static CLProgramHandle CreateProgramWithSourceWrapper(CLContextHandle context, int count, string[] strings, IntPtr[] lengths)
        {
            var handle = CreateProgramWithSource(context, count, strings, lengths, out ComputeErrorCode errcode_ret);

            ComputeException.ThrowOnError(errcode_ret);
            return(handle);
        }
Beispiel #4
0
        public static CLProgramHandle CreateProgramWithBinaryWrapper(CLContextHandle context, int num_devices, CLDeviceHandle[] device_list, string kernel_names, IntPtr[] lengths)
        {
            var handle = CreateProgramWithBuiltInKernels(context, num_devices, device_list, kernel_names, lengths, out ComputeErrorCode errcode_ret);

            ComputeException.ThrowOnError(errcode_ret);
            return(handle);
        }
        public static CLProgramHandle CreateProgramWithILWrapper(CLContextHandle context, IntPtr il, IntPtr length)
        {
            var handle = CreateProgramWithIL(context, il, length, out ComputeErrorCode errcode_ret);

            ComputeException.ThrowOnError(errcode_ret);
            return(handle);
        }
Beispiel #6
0
 public extern static CLMemoryHandle CreateFromGLTexture3D(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     Int32 target,
     Int32 miplevel,
     Int32 texture,
     out ComputeErrorCode errcode_ret);
Beispiel #7
0
 public extern static ComputeErrorCode GetSupportedImageFormats(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     ComputeMemoryType image_type,
     Int32 num_entries,
     [Out, MarshalAs(UnmanagedType.LPArray)] ComputeImageFormat[] image_formats,
     out Int32 num_image_formats);
Beispiel #8
0
        public static CLSamplerHandle CreateSamplerWrapper(CLContextHandle context, bool normalized_coords, ComputeImageAddressing addressing_mode, ComputeImageFiltering filter_mode)
        {
            var handle = CreateSampler(context, normalized_coords, addressing_mode, filter_mode, out ComputeErrorCode errcode_ret);

            ComputeException.ThrowOnError(errcode_ret);
            return(handle);
        }
Beispiel #9
0
        public static CLProgramHandle CreateProgramWithBinaryWrapper(CLContextHandle context,
                                                                     int num_devices, CLDeviceHandle[] device_list, IntPtr[] lengths, IntPtr[] binaries, int[] binary_status)
        {
            var handle = CreateProgramWithBinary(context, num_devices, device_list, lengths, binaries, binary_status, out ComputeErrorCode errcode_ret);

            ComputeException.ThrowOnError(errcode_ret);
            return(handle);
        }
Beispiel #10
0
 public static void GetContextInfoWrapper(CLContextHandle context,
                                          ComputeContextInfo param_name,
                                          IntPtr param_value_size,
                                          IntPtr param_value,
                                          out IntPtr param_value_size_ret)
 {
     ComputeException.ThrowOnError(GetContextInfo(context, param_name, param_value_size, param_value, out param_value_size_ret));
 }
Beispiel #11
0
 public extern static CLProgramHandle CreateProgramWithBinary(
     CLContextHandle context,
     Int32 num_devices,
     [MarshalAs(UnmanagedType.LPArray)] CLDeviceHandle[] device_list,
     [MarshalAs(UnmanagedType.LPArray)] IntPtr[] lengths,
     [MarshalAs(UnmanagedType.LPArray)] IntPtr[] binaries,
     [MarshalAs(UnmanagedType.LPArray)] Int32[] binary_status,
     out ComputeErrorCode errcode_ret);
Beispiel #12
0
 public extern static CLMemoryHandle CreateImage2D(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     ref ComputeImageFormat image_format,
     IntPtr image_width,
     IntPtr image_height,
     IntPtr image_row_pitch,
     IntPtr host_ptr,
     out ComputeErrorCode errcode_ret);
Beispiel #13
0
 public new static CLMemoryHandle CreateFromGLTexture3D(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     Int32 target,
     Int32 miplevel,
     Int32 texture,
     out ComputeErrorCode errcode_ret)
 {
     Trace.WriteLine("WARNING! clCreateFromGLTexture3D has been deprecated in OpenCL 1.2.");
     return(CL11.CreateFromGLTexture3D(context, flags, target, miplevel, texture, out errcode_ret));
 }
Beispiel #14
0
 public static new CLMemoryHandle CreateFromGLTexture3D(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     Int32 target,
     Int32 miplevel,
     Int32 texture,
     out ComputeErrorCode errcode_ret)
 {
     Trace.WriteLine("WARNING! clCreateFromGLTexture3D has been deprecated in OpenCL 1.2.");
     return CL11.CreateFromGLTexture3D(context, flags, target, miplevel, texture, out errcode_ret);
 }
Beispiel #15
0
 public new static CLMemoryHandle CreateImage2D(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     ref ComputeImageFormat image_format,
     IntPtr image_width,
     IntPtr image_height,
     IntPtr image_row_pitch,
     IntPtr host_ptr,
     out ComputeErrorCode errcode_ret)
 {
     Trace.WriteLine("WARNING! clCreateImage2D has been deprecated in OpenCL 1.2.");
     return(CL11.CreateImage2D(context, flags, ref image_format, image_width, image_height, image_row_pitch, host_ptr, out errcode_ret));
 }
Beispiel #16
0
 public static new CLMemoryHandle CreateImage2D(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     ref ComputeImageFormat image_format,
     IntPtr image_width,
     IntPtr image_height,
     IntPtr image_row_pitch,
     IntPtr host_ptr,
     out ComputeErrorCode errcode_ret)
 {
     Trace.WriteLine("WARNING! clCreateImage2D has been deprecated in OpenCL 1.2.");
     return CL11.CreateImage2D(context, flags, ref image_format, image_width, image_height, image_row_pitch, host_ptr, out errcode_ret);
 }
Beispiel #17
0
 public new static CLMemoryHandle CreateImage3D(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     ref ComputeImageFormat image_format,
     IntPtr image_width,
     IntPtr image_height,
     IntPtr image_depth,
     IntPtr image_row_pitch,
     IntPtr image_slice_pitch,
     IntPtr host_ptr,
     out ComputeErrorCode errcode_ret)
 {
     RILogManager.Default?.SendTrace("WARNING! clCreateImage3D has been deprecated in OpenCL 1.2.");
     return(CL11.CreateImage3D(context, flags, ref image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, out errcode_ret));
 }
Beispiel #18
0
 public static extern ComputeErrorCode GetContextInfo(
     CLContextHandle context,
     ComputeContextInfo param_name,
     IntPtr param_value_size,
     IntPtr param_value,
     out IntPtr param_value_size_ret);
Beispiel #19
0
 public static extern ComputeErrorCode RetainContext(
     CLContextHandle context);
Beispiel #20
0
 public static extern CLMemoryHandle CreateImage3D(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     ref ComputeImageFormat image_format,
     IntPtr image_width,
     IntPtr image_height,
     IntPtr image_depth,
     IntPtr image_row_pitch,
     IntPtr image_slice_pitch,
     IntPtr host_ptr,
     out ComputeErrorCode errcode_ret);
Beispiel #21
0
 public static extern CLProgramHandle CreateProgramWithSource(
     CLContextHandle context,
     Int32 count,
     [In] String[] strings,
     [MarshalAs(UnmanagedType.LPArray)] IntPtr[] lengths,
     out ComputeErrorCode errcode_ret);
Beispiel #22
0
 public ComputeErrorCode RetainContext(CLContextHandle context)
 {
     return StaticRetainContext(context);
 }
Beispiel #23
0
 public static extern CLMemoryHandle CreateFromGLRenderbuffer(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     Int32 renderbuffer,
     out ComputeErrorCode errcode_ret);
Beispiel #24
0
 public CLMemoryHandle CreateFromGLBuffer(CLContextHandle context, ComputeMemoryFlags flags, Int32 bufobj, out ComputeErrorCode errcode_ret)
 {
     return StaticCreateFromGLBuffer(context, flags, bufobj, out errcode_ret);
 }
Beispiel #25
0
 public extern static CLCommandQueueHandle CreateCommandQueueWithProperties(
     CLContextHandle context,
     CLDeviceHandle device,
     [MarshalAs(UnmanagedType.LPArray)] ComputeCommandQueueFlags[] properties,
     out ComputeErrorCode errcode_ret);
Beispiel #26
0
 public CLMemoryHandle CreateBuffer(CLContextHandle context, ComputeMemoryFlags flags, IntPtr size, IntPtr host_ptr, out ComputeErrorCode errcode_ret)
 {
     return StaticCreateBuffer(context, flags, size, host_ptr, out errcode_ret);
 }
Beispiel #27
0
 public CLCommandQueueHandle CreateCommandQueueWithProperties(CLContextHandle context, CLDeviceHandle device, ComputeCommandQueueFlags properties, out ComputeErrorCode errcode_ret)
 {
     throw new NotImplementedException();
 }
Beispiel #28
0
 public void ComputeSvmFree(CLContextHandle context, CLMemoryHandle svm_pointer)
 {
     throw new NotImplementedException();
 }
Beispiel #29
0
 public CLMemoryHandle ComputeSvmAlloc(CLContextHandle context, ComputeMemoryFlags flags, IntPtr size, int alignment)
 {
     throw new NotImplementedException();
 }
Beispiel #30
0
 public extern static ComputeErrorCode TerminateContextKHR(
     CLContextHandle context);
Beispiel #31
0
 CLProgramHandle ICL10.CreateProgramWithBinary(CLContextHandle context, int num_devices, CLDeviceHandle[] device_list,
                                               IntPtr[] lengths, IntPtr[] binaries, int[] binary_status,
                                               out ComputeErrorCode errcode_ret)
 {
     return(CreateProgramWithBinary(context, num_devices, device_list, lengths, binaries, binary_status, out errcode_ret));
 }
Beispiel #32
0
 public CLMemoryHandle CreateFromGLTexture(CLContextHandle context, ComputeMemoryFlags flags, int texture_target, int miplevel, int texture, out ComputeErrorCode errcode_ret)
 {
     throw new NotImplementedException();
 }
Beispiel #33
0
 public extern static CLSamplerHandle CreateSampler(
     CLContextHandle context,
     [MarshalAs(UnmanagedType.Bool)] bool normalized_coords,
     ComputeImageAddressing addressing_mode,
     ComputeImageFiltering filter_mode,
     out ComputeErrorCode errcode_ret);
Beispiel #34
0
 CLMemoryHandle ICL10.CreateFromGLTexture3D(CLContextHandle context, ComputeMemoryFlags flags, int target, int miplevel,
                                            int texture, out ComputeErrorCode errcode_ret)
 {
     return(CreateFromGLTexture3D(context, flags, target, miplevel, texture, out errcode_ret));
 }
Beispiel #35
0
 public ComputeErrorCode LinkProgram(CLContextHandle context, int num_devices, [MarshalAs(UnmanagedType.LPArray)] CLDeviceHandle[] device_list, string options, int num_input_programs, ComputeProgramBuildNotifier pfn_notify, IntPtr user_data, out ComputeErrorCode errcode_ret)
 {
     throw new NotImplementedException();
 }
Beispiel #36
0
 public extern static ComputeErrorCode ReleaseContext(
     CLContextHandle context);
Beispiel #37
0
 public static extern CLCommandQueueHandle CreateCommandQueue(
     CLContextHandle context,
     CLDeviceHandle device,
     ComputeCommandQueueFlags properties,
     out ComputeErrorCode errcode_ret);
Beispiel #38
0
 public extern static CLCommandQueueHandle CreateCommandQueue(
     CLContextHandle context,
     CLDeviceHandle device,
     ComputeCommandQueueFlags properties,
     out ComputeErrorCode errcode_ret);
Beispiel #39
0
 public static extern CLMemoryHandle CreateFromGLTexture3D(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     Int32 target,
     Int32 miplevel,
     Int32 texture,
     out ComputeErrorCode errcode_ret);
Beispiel #40
0
 public extern static CLProgramHandle CreateProgramWithSource(
     CLContextHandle context,
     Int32 count,
     String[] strings,
     [MarshalAs(UnmanagedType.LPArray)] IntPtr[] lengths,
     out ComputeErrorCode errcode_ret);
Beispiel #41
0
 public static extern CLProgramHandle CreateProgramWithBinary(
     CLContextHandle context,
     Int32 num_devices,
     [MarshalAs(UnmanagedType.LPArray)] CLDeviceHandle[] device_list,
     [MarshalAs(UnmanagedType.LPArray)] IntPtr[] lengths,
     [MarshalAs(UnmanagedType.LPArray)] IntPtr[] binaries,
     [MarshalAs(UnmanagedType.LPArray)] Int32[] binary_status,
     out ComputeErrorCode errcode_ret);
Beispiel #42
0
 CLMemoryHandle ICL10.CreateFromGLBuffer(CLContextHandle context, ComputeMemoryFlags flags, int bufobj,
                                         out ComputeErrorCode errcode_ret)
 {
     return(CreateFromGLBuffer(context, flags, bufobj, out errcode_ret));
 }
Beispiel #43
0
 public static extern CLSamplerHandle CreateSampler(
     CLContextHandle context,
     [MarshalAs(UnmanagedType.Bool)] bool normalized_coords,
     ComputeImageAddressing addressing_mode,
     ComputeImageFiltering filter_mode,
     out ComputeErrorCode errcode_ret);
Beispiel #44
0
 public CLSamplerHandle CreateSamplerWithProperties(CLContextHandle context, [MarshalAs(UnmanagedType.LPArray)] ComputeSamplerInfo[] normalized_coords, out ComputeErrorCode errcode_ret)
 {
     throw new NotImplementedException();
 }
Beispiel #45
0
 public static extern ComputeErrorCode GetSupportedImageFormats(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     ComputeMemoryType image_type,
     Int32 num_entries,
     [Out, MarshalAs(UnmanagedType.LPArray)] ComputeImageFormat[] image_formats,
     out Int32 num_image_formats);
Beispiel #46
0
 public CLEventHandle CreateUserEvent(CLContextHandle context, out ComputeErrorCode errcode_ret)
 {
     throw new NotImplementedException();
 }
Beispiel #47
0
 public static extern CLMemoryHandle CreateBuffer(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     IntPtr size,
     IntPtr host_ptr,
     out ComputeErrorCode errcode_ret);
Beispiel #48
0
 public ComputeErrorCode GetContextInfo(CLContextHandle context, ComputeContextInfo param_name, IntPtr param_value_size, IntPtr param_value, out IntPtr param_value_size_ret)
 {
     return StaticGetContextInfo(context, param_name, param_value_size, param_value, out param_value_size_ret);
 }
Beispiel #49
0
 CLProgramHandle ICL10.CreateProgramWithSource(CLContextHandle context, int count, string[] strings, IntPtr[] lengths,
                                               out ComputeErrorCode errcode_ret)
 {
     return(CreateProgramWithSource(context, count, strings, lengths, out errcode_ret));
 }
Beispiel #50
0
 public static extern CLMemoryHandle StaticCreateFromGLBuffer(CLContextHandle context, ComputeMemoryFlags flags, Int32 bufobj, out ComputeErrorCode errcode_ret);
Beispiel #51
0
 public CLMemoryHandle CreateFromGLTexture2D(CLContextHandle context, ComputeMemoryFlags flags, Int32 target, Int32 miplevel, Int32 texture, out ComputeErrorCode errcode_ret)
 {
     return StaticCreateFromGLTexture2D(context, flags, target, miplevel, texture, out errcode_ret);
 }
Beispiel #52
0
 public static void ReleaseContextWrapper(CLContextHandle context)
 {
     ComputeException.ThrowOnError(ReleaseContext(context));
 }
Beispiel #53
0
 public extern static CLMemoryHandle CreateFromGLRenderbuffer(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     Int32 renderbuffer,
     out ComputeErrorCode errcode_ret);
Beispiel #54
0
 public CLMemoryHandle CreateImage(CLContextHandle context, ComputeMemoryFlags flags, ref ComputeImageFormat image_format, ref ComputeImageDescription image_desc, IntPtr host_ptr, out ComputeErrorCode errcode_ret)
 {
     throw new NotImplementedException();
 }
Beispiel #55
0
 public extern static ComputeErrorCode GetContextInfo(
     CLContextHandle context,
     ComputeContextInfo param_name,
     IntPtr param_value_size,
     IntPtr param_value,
     out IntPtr param_value_size_ret);
Beispiel #56
0
 public CLMemoryHandle CreateImage2D(CLContextHandle context, ComputeMemoryFlags flags, ref ComputeImageFormat image_format, IntPtr image_width, IntPtr image_height, IntPtr image_row_pitch, IntPtr host_ptr, out ComputeErrorCode errcode_ret)
 {
     return StaticCreateImage2D(context, flags,ref image_format, image_width, image_height, image_row_pitch, host_ptr, out errcode_ret);
 }
Beispiel #57
0
 public extern static CLMemoryHandle CreateBuffer(
     CLContextHandle context,
     ComputeMemoryFlags flags,
     IntPtr size,
     IntPtr host_ptr,
     out ComputeErrorCode errcode_ret);
Beispiel #58
0
 public CLMemoryHandle CreatePipe(CLContextHandle context, ComputeMemoryFlags flags, int pipe_packet_size, int pipe_max_packets, [MarshalAs(UnmanagedType.LPArray)] IntPtr[] properties, out ComputeErrorCode errcode_ret)
 {
     throw new NotImplementedException();
 }
Beispiel #59
0
 public extern static CLEventHandle CreateUserEvent(
     CLContextHandle context,
     out ComputeErrorCode errcode_ret);
Beispiel #60
0
 public CLProgramHandle CreateProgramWithBuiltInKernels(CLContextHandle context, int num_devices, [MarshalAs(UnmanagedType.LPArray)] CLDeviceHandle[] device_list, string kernel_names, out ComputeErrorCode errcode_ret)
 {
     throw new NotImplementedException();
 }