本文整理汇总了C#中ComputeErrorCode类的典型用法代码示例。如果您正苦于以下问题:C# ComputeErrorCode类的具体用法?C# ComputeErrorCode怎么用?C# ComputeErrorCode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ComputeErrorCode类属于命名空间,在下文中一共展示了ComputeErrorCode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateContext
public static unsafe extern IntPtr CreateContext(
IntPtr* properties,
Int32 num_devices,
IntPtr* devices,
/* void (*pfn_notify)(const char *, const IntPtr, IntPtr, IntPtr) */ IntPtr pfn_notify,
/* void* */ IntPtr user_data,
ComputeErrorCode* errcode_ret);
示例2: ComputeSampler
/// <summary>
/// ComputeSamplerWithProperties
/// </summary>
/// <param name="context"></param>
/// <param name="sampler_properties"></param>
/// <param name="error"></param>
public ComputeSampler(ComputeContext context, ComputeSamplerInfo[] sampler_properties, out ComputeErrorCode error)
{
error = ComputeErrorCode.Success;
Handle = CLInterface.CL20.CreateSamplerWithProperties(context.Handle, sampler_properties, out error);
ComputeException.ThrowOnError(error);
SetID(Handle.Value);
this.context = context;
}
示例3: CreateFromGLTexture3D
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);
}
示例4: CreateSubBuffer
public static unsafe extern IntPtr CreateSubBuffer(
IntPtr buffer,
ComputeMemoryFlags flags,
ComputeBufferCreateType buffer_create_type,
/* const void * */ IntPtr buffer_create_info,
ComputeErrorCode* errcode_ret);
示例5: ComputeException
/// <summary>
/// Creates a new <see cref="ComputeException"/> with a specified <see cref="ComputeErrorCode"/>.
/// </summary>
/// <param name="code"> A <see cref="ComputeErrorCode"/>. </param>
public ComputeException(ComputeErrorCode code)
: base("OpenCL error code detected: " + code.ToString() + ".")
{
this.code = code;
}
示例6: EnqueueMapImage
public static extern IntPtr EnqueueMapImage(
CLCommandQueueHandle command_queue,
CLMemoryHandle image,
[MarshalAs(UnmanagedType.Bool)] bool blocking_map,
ComputeMemoryMappingFlags map_flags,
ref SysIntX3 origin,
ref SysIntX3 region,
out IntPtr image_row_pitch,
out IntPtr image_slice_pitch,
Int32 num_events_in_wait_list,
[MarshalAs(UnmanagedType.LPArray)] CLEventHandle[] event_wait_list,
[Out, MarshalAs(UnmanagedType.LPArray, SizeConst = 1)] CLEventHandle[] new_event,
out ComputeErrorCode errcode_ret);
示例7: CreateSampler
public static extern CLSamplerHandle CreateSampler(
CLContextHandle context,
[MarshalAs(UnmanagedType.Bool)] bool normalized_coords,
ComputeImageAddressing addressing_mode,
ComputeImageFiltering filter_mode,
out ComputeErrorCode errcode_ret);
示例8: CreateProgramWithBinary
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);
示例9: CreateImage3D
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);
示例10: CreateUserEvent
public CLEventHandle CreateUserEvent(CLContextHandle context, out ComputeErrorCode errcode_ret)
{
throw new NotImplementedException();
}
示例11: CreateSubBuffer
public CLMemoryHandle CreateSubBuffer(CLMemoryHandle buffer, ComputeMemoryFlags flags, ComputeBufferCreateType buffer_create_type, ref SysIntX2 buffer_create_info, out ComputeErrorCode errcode_ret)
{
throw new NotImplementedException();
}
示例12: CreateSamplerWithProperties
public CLSamplerHandle CreateSamplerWithProperties(CLContextHandle context, [MarshalAs(UnmanagedType.LPArray)] ComputeSamplerInfo[] normalized_coords, out ComputeErrorCode errcode_ret)
{
throw new NotImplementedException();
}
示例13: CreateProgramWithBuiltInKernels
public CLProgramHandle CreateProgramWithBuiltInKernels(CLContextHandle context, int num_devices, [MarshalAs(UnmanagedType.LPArray)] CLDeviceHandle[] device_list, string kernel_names, out ComputeErrorCode errcode_ret)
{
throw new NotImplementedException();
}
示例14: CreatePipe
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();
}
示例15: CreateKernel
public CLKernelHandle CreateKernel(CLProgramHandle program, String kernel_name, out ComputeErrorCode errcode_ret)
{
return StaticCreateKernel(program, kernel_name, out errcode_ret);
}