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);
/// <summary> /// Creates a new <see cref="ComputeImageDescription"/>. /// </summary> public ComputeImageDescription(ComputeMemoryType image_type, long image_width, long image_height, long image_depth, long image_array_size, long image_row_pitch, long image_slice_pitch, long num_mip_levels, long num_samples, IntPtr buffer) { this.image_type = image_type; this.image_width = new IntPtr(image_width); this.image_height = new IntPtr(image_height); this.image_depth = new IntPtr(image_depth); this.image_array_size = new IntPtr(image_array_size); this.image_row_pitch = new IntPtr(image_row_pitch); this.image_slice_pitch = new IntPtr(image_slice_pitch); this.num_mip_levels = (uint)num_mip_levels; this.num_samples = (uint)num_samples; this.buffer = buffer; }
/// <summary> /// /// </summary> /// <param name="context"></param> /// <param name="flags"></param> /// <param name="type"></param> /// <returns></returns> protected static ICollection <ComputeImageFormat> GetSupportedFormats(ComputeContext context, ComputeMemoryFlags flags, ComputeMemoryType type) { int formatCountRet = 0; ComputeErrorCode error = CL12.GetSupportedImageFormats(context.Handle, flags, type, 0, null, out formatCountRet); ComputeException.ThrowOnError(error); ComputeImageFormat[] formats = new ComputeImageFormat[formatCountRet]; error = CL12.GetSupportedImageFormats(context.Handle, flags, type, formatCountRet, formats, out formatCountRet); ComputeException.ThrowOnError(error); return(new Collection <ComputeImageFormat>(formats)); }
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);
/// <summary> /// /// </summary> /// <param name="context"></param> /// <param name="flags"></param> /// <param name="type"></param> /// <returns></returns> protected static ICollection<ComputeImageFormat> GetSupportedFormats(ComputeContext context, ComputeMemoryFlags flags, ComputeMemoryType type) { int formatCountRet = 0; ComputeErrorCode error = CL12.GetSupportedImageFormats(context.Handle, flags, type, 0, null, out formatCountRet); ComputeException.ThrowOnError(error); ComputeImageFormat[] formats = new ComputeImageFormat[formatCountRet]; error = CL12.GetSupportedImageFormats(context.Handle, flags, type, formatCountRet, formats, out formatCountRet); ComputeException.ThrowOnError(error); return new Collection<ComputeImageFormat>(formats); }
protected static ICollection<ComputeImageFormat> GetSupportedFormats(ComputeContext context, ComputeMemoryFlags flags, ComputeMemoryType type) { unsafe { int formatCountRet = 0; ComputeErrorCode error = CL10.GetSupportedImageFormats(context.Handle, flags, type, 0, null, &formatCountRet); ComputeException.ThrowOnError(error); ComputeImageFormat[] formats = new ComputeImageFormat[formatCountRet]; fixed (ComputeImageFormat* formatsPtr = formats) { error = CL10.GetSupportedImageFormats(context.Handle, flags, type, formatCountRet, formatsPtr, null); ComputeException.ThrowOnError(error); } return new Collection<ComputeImageFormat>(formats); } }
public static unsafe extern ComputeErrorCode GetSupportedImageFormats( IntPtr context, ComputeMemoryFlags flags, ComputeMemoryType image_type, Int32 num_entries, ComputeImageFormat* image_formats, Int32* num_image_formats);
ComputeErrorCode ICL10.GetSupportedImageFormats(CLContextHandle context, ComputeMemoryFlags flags, ComputeMemoryType image_type, int num_entries, ComputeImageFormat[] image_formats, out int num_image_formats) { return GetSupportedImageFormats(context, flags, image_type, num_entries, image_formats, out num_image_formats); }
/// <summary> /// Creates a new <see cref="ComputeImageDescription"/>. /// </summary> public ComputeImageDescription(ComputeMemoryType image_type, long image_width, long image_height) : this(image_type, image_width, image_height, 1, 0, 0, 0, 0, 0, IntPtr.Zero) { }
ComputeErrorCode ICL10.GetSupportedImageFormats(CLContextHandle context, ComputeMemoryFlags flags, ComputeMemoryType image_type, int num_entries, ComputeImageFormat[] image_formats, out int num_image_formats) { return(GetSupportedImageFormats(context, flags, image_type, num_entries, image_formats, out num_image_formats)); }