Esempio n. 1
0
 new public static OpenCLErrorCode SetCommandQueueProperty(
     CLCommandQueueHandle command_queue,
     OpenCLCommandQueueProperties properties,
     [MarshalAs(UnmanagedType.Bool)] bool enable,
     out OpenCLCommandQueueProperties old_properties)
 {
     //Trace.WriteLine("WARNING! clSetCommandQueueProperty has been deprecated in OpenCL 1.1.");
     return(CL10.SetCommandQueueProperty(command_queue, properties, enable, out old_properties));
 }
Esempio n. 2
0
        /// <summary>
        /// Creates a new <see cref="OpenCLCommandQueue"/>.
        /// </summary>
        /// <param name="context"> A <see cref="OpenCLContext"/>. </param>
        /// <param name="device"> A <see cref="OpenCLDevice"/> associated with the <paramref name="context"/>. It can either be one of <see cref="OpenCLContext.Devices"/> or have the same <see cref="OpenCLDeviceTypes"/> as the <paramref name="device"/> specified when the <paramref name="context"/> is created. </param>
        /// <param name="properties"> The properties for the <see cref="OpenCLCommandQueue"/>. </param>
        public OpenCLCommandQueue(OpenCLContext context, OpenCLDevice device, OpenCLCommandQueueProperties properties)
        {
            OpenCLErrorCode error = OpenCLErrorCode.Success;

            Handle = CL10.CreateCommandQueue(context.Handle, device.Handle, properties, out error);
            OpenCLException.ThrowOnError(error);

            SetID(Handle.Value);

            this.device  = device;
            this.context = context;

            outOfOrderExec = ((properties & OpenCLCommandQueueProperties.OutOfOrderExecution) == OpenCLCommandQueueProperties.OutOfOrderExecution);
            profiling      = ((properties & OpenCLCommandQueueProperties.Profiling) == OpenCLCommandQueueProperties.Profiling);

            Events = new List <OpenCLEventBase>();

            //Trace.WriteLine("Create " + this + " in Thread(" + Thread.CurrentThread.ManagedThreadId + ").", "Information");
        }
        /// <summary>
        /// Creates a new <see cref="OpenCLCommandQueue"/>.
        /// </summary>
        /// <param name="context"> A <see cref="OpenCLContext"/>. </param>
        /// <param name="device"> A <see cref="OpenCLDevice"/> associated with the <paramref name="context"/>. It can either be one of <see cref="OpenCLContext.Devices"/> or have the same <see cref="OpenCLDeviceTypes"/> as the <paramref name="device"/> specified when the <paramref name="context"/> is created. </param>
        /// <param name="properties"> The properties for the <see cref="OpenCLCommandQueue"/>. </param>
        public OpenCLCommandQueue(OpenCLContext context, OpenCLDevice device, OpenCLCommandQueueProperties properties)
        {
            OpenCLErrorCode error = OpenCLErrorCode.Success;
            Handle = CL10.CreateCommandQueue(context.Handle, device.Handle, properties, out error);
            OpenCLException.ThrowOnError(error);
            
            SetID(Handle.Value);
            
            this.device = device;
            this.context = context;

            outOfOrderExec = ((properties & OpenCLCommandQueueProperties.OutOfOrderExecution) == OpenCLCommandQueueProperties.OutOfOrderExecution);
            profiling = ((properties & OpenCLCommandQueueProperties.Profiling) == OpenCLCommandQueueProperties.Profiling);
            
            Events = new List<OpenCLEventBase>();

            //Trace.WriteLine("Create " + this + " in Thread(" + Thread.CurrentThread.ManagedThreadId + ").", "Information");
        }
Esempio n. 4
0
 new public static OpenCLErrorCode SetCommandQueueProperty(
     CLCommandQueueHandle command_queue,
     OpenCLCommandQueueProperties properties,
     [MarshalAs(UnmanagedType.Bool)] bool enable,
     out OpenCLCommandQueueProperties old_properties)
 {
     //Trace.WriteLine("WARNING! clSetCommandQueueProperty has been deprecated in OpenCL 1.1.");
     return CL10.SetCommandQueueProperty(command_queue, properties, enable, out old_properties);
 }
Esempio n. 5
0
 public extern static OpenCLErrorCode SetCommandQueueProperty(
     CLCommandQueueHandle command_queue,
     OpenCLCommandQueueProperties properties,
     [MarshalAs(UnmanagedType.Bool)] bool enable,
     out OpenCLCommandQueueProperties old_properties);
Esempio n. 6
0
 public extern static CLCommandQueueHandle CreateCommandQueue(
     CLContextHandle context,
     CLDeviceHandle device,
     OpenCLCommandQueueProperties properties,
     out OpenCLErrorCode errcode_ret);
Esempio n. 7
0
 public extern static OpenCLErrorCode SetCommandQueueProperty(
     CLCommandQueueHandle command_queue,
     OpenCLCommandQueueProperties properties,
     [MarshalAs(UnmanagedType.Bool)] bool enable,
     out OpenCLCommandQueueProperties old_properties);
Esempio n. 8
0
 public extern static CLCommandQueueHandle CreateCommandQueue(
     CLContextHandle context,
     CLDeviceHandle device,
     OpenCLCommandQueueProperties properties,
     out OpenCLErrorCode errcode_ret);