示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CommandQueueDescription"/> struct.
 /// </summary>
 /// <param name="type">The queue type.</param>
 /// <param name="priority">The priority.</param>
 /// <param name="flags">Options flags.</param>
 /// <param name="nodeMask">Node mask.</param>
 public CommandQueueDescription(CommandListType type, CommandQueuePriority priority, CommandQueueFlags flags = CommandQueueFlags.None, int nodeMask = 0)
 {
     Type     = type;
     Priority = (int)priority;
     Flags    = flags;
     NodeMask = nodeMask;
 }
示例#2
0
 public static extern IntPtr CreateCommandQueue(
     IntPtr context,
     IntPtr device,
     CommandQueueFlags
     properties,
     out ReturnCode errcode_ret
     );
 public CommandQueueDescription(CommandListType type, CommandQueueFlags flags = CommandQueueFlags.None)
 {
     Type     = type;
     Priority = 0;
     Flags    = flags;
     NodeMask = 0;
 }
示例#4
0
        public static CommandQueue Create(Context context, Device device, CommandQueueFlags flags)
        {
            IntPtr    handle    = IntPtr.Zero;
            ErrorCode errorCode = ErrorCode.Success;

            unsafe {
                handle = Native.CreateCommandQueue(context.Handle, device.Handle, flags, &errorCode);
            }
            if (errorCode != ErrorCode.Success)
            {
                throw new OpenCLCallFailedException(errorCode);
            }
            return(new CommandQueue(handle));
        }
示例#5
0
        public CommandQueue(Context context, Device device, CommandQueueFlags flags)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (device == null)
            {
                throw new ArgumentNullException("device");
            }
            _context = context;
            _device  = device;
            ReturnCode code;

            _handle = NativeMethods.CreateCommandQueue(context.Handle, device.Handle, flags, out code);
            OpenCLException.ThrowOnError(code);
        }
示例#6
0
 internal extern static unsafe IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueFlags properties, [Out] ErrorCode *errcode_ret);
示例#7
0
 internal extern static unsafe ErrorCode SetCommandQueueProperty(IntPtr command_queue, CommandQueueFlags properties, bool enable, CommandQueueFlags *old_properties);
示例#8
0
文件: Core.cs 项目: Sidd710/tempRepo
 internal extern static unsafe IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueFlags properties, [OutAttribute] OpenTK.Compute.CL10.ErrorCode *errcode_ret);
示例#9
0
 internal extern static unsafe IntPtr CreateCommandQueue(IntPtr context, IntPtr device, CommandQueueFlags properties, [OutAttribute] OpenTK.Compute.CL10.ErrorCode* errcode_ret);
示例#10
0
 internal extern static unsafe int SetCommandQueueProperty(IntPtr command_queue, CommandQueueFlags properties, bool enable, CommandQueueFlags* old_properties);
 public CommandQueueDescription(CommandListType type, CommandQueueFlags flags = CommandQueueFlags.None) : this()
 {
     Type  = type;
     Flags = flags;
 }
 public CommandQueueDescription(CommandListType type, CommandQueueFlags flags = CommandQueueFlags.None) : this()
 {
     Type = type;
     Flags = flags;
 }
示例#13
0
 public void SetProperty(CommandQueueFlags flags, bool enable)
 {
     unsafe {
         Native.Call(Native.SetCommandQueueProperty(this.Handle, flags, enable, null));
     }
 }