Ejemplo n.º 1
0
        public Image CreateImage3D(MemFlags flags, ImageFormat imageFormat, IntPtr imageWidth, IntPtr imageHeight, IntPtr imageDepth, IntPtr imageRowPitch, IntPtr imageSlicePitch, IntPtr pHost)
        {
            IntPtr memID;
            ErrorCode result;

            memID = (IntPtr)OpenCL.CreateImage3D(ContextID, (ulong)flags, imageFormat, imageWidth, imageHeight, imageDepth, imageRowPitch, imageSlicePitch, pHost.ToPointer(), out result);
            if (result != ErrorCode.SUCCESS)
                throw new OpenCLException("CreateImage3D failed with error code " + result, result);
            return new Image(this, memID);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Query which ImageFormats are supported by this context
        /// </summary>
        /// <param name="flags"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public ImageFormat[] GetSupportedImageFormats(MemFlags flags, MemObjectType type)
        {
            uint numImageFormats;
            ImageFormat[] imageFormats;
            ErrorCode result;

            result = OpenCL.GetSupportedImageFormats(ContextID, (ulong)flags, (uint)type, (uint)0, null, out numImageFormats);
            if( result!=ErrorCode.SUCCESS )
                throw new OpenCLException("GetSupportedImageFormats failed with error code " + result, result);

            imageFormats = new ImageFormat[numImageFormats];

            result = OpenCL.GetSupportedImageFormats(ContextID, (ulong)flags, (uint)type, numImageFormats, imageFormats, out numImageFormats);
            if (result != ErrorCode.SUCCESS)
                throw new OpenCLException("GetSupportedImageFormats failed with error code " + result, result);

            return imageFormats;
        }
Ejemplo n.º 3
0
 public Image CreateImage2D(MemFlags flags, ImageFormat imageFormat, long imageWidth, long imageHeight, long imageRowPitch, IntPtr pHost)
 {
     return CreateImage2D(flags, imageFormat, (IntPtr)imageWidth, (IntPtr)imageHeight, (IntPtr)imageRowPitch, pHost);
 }
Ejemplo n.º 4
0
 public Image CreateImage3D(MemFlags flags, ImageFormat imageFormat, int imageWidth, int imageHeight, int imageDepth, int imageRowPitch, int imageSlicePitch, IntPtr pHost)
 {
     return CreateImage3D(flags, imageFormat, (IntPtr)imageWidth, (IntPtr)imageHeight, (IntPtr)imageDepth, (IntPtr)imageRowPitch, (IntPtr)imageSlicePitch, pHost);
 }
Ejemplo n.º 5
0
 public Image CreateImage2D(MemFlags flags, ImageFormat imageFormat, long imageWidth, long imageHeight)
 {
     return CreateImage2D(flags, imageFormat, (IntPtr)imageWidth, (IntPtr)imageHeight, IntPtr.Zero, IntPtr.Zero);
 }
Ejemplo n.º 6
0
 public static ErrorCode GetSupportedImageFormats(IntPtr context, ulong flags, uint image_type, uint num_entries, ImageFormat[] image_formats, out uint num_image_formats)
 {
     return OpenCLAPI.clGetSupportedImageFormats(context, flags, image_type, num_entries, image_formats, out num_image_formats);
 }
Ejemplo n.º 7
0
 public static IntPtr CreateImage3D(IntPtr context, ulong flags, ImageFormat image_format, IntPtr image_width, IntPtr image_height, IntPtr image_depth, IntPtr image_row_pitch, IntPtr image_slice_pitch, void* host_ptr, out ErrorCode errcode_ret)
 {
     return OpenCLAPI.clCreateImage3D(context, flags, &image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, out errcode_ret);
 }
Ejemplo n.º 8
0
 public static IntPtr CreateImage3D(IntPtr context, ulong flags, ImageFormat image_format, IntPtr image_width, IntPtr image_height, IntPtr image_depth, IntPtr image_row_pitch, IntPtr image_slice_pitch, void *host_ptr, out ErrorCode errcode_ret)
 {
     return(OpenCLAPI.clCreateImage3D(context, flags, &image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, out errcode_ret));
 }
Ejemplo n.º 9
0
		public static IntPtr CreateImage2D(IntPtr context, UInt64 flags, ImageFormat image_format, IntPtr image_width, IntPtr image_height, IntPtr image_row_pitch, void* host_ptr, out ErrorCode errcode_ret) {
			return OpenCLAPI.clCreateImage2D(context, flags, &image_format, image_width, image_height, image_row_pitch, host_ptr, out errcode_ret);
		}