Exemple #1
0
 internal CommandQueue(CLCommandQueue openclCommandQueue, Context context, Device device, CommandQueueProperties commandQueueProperties)
 {
     this.Device = device;
     this.Context = context;
     this.CLCommandQueue = openclCommandQueue;
     this.CLCommandQueueProperties = commandQueueProperties;
 }
Exemple #2
0
        public static CommandQueue Create(Context context, Device device, CommandQueueProperties commandQueueProperties)
        {
            CLError error = CLError.None;

            CLCommandQueue openclCommandQueue = OpenCLDriver.clCreateCommandQueue(context.CLContext, device.CLDeviceID, (ManOCL.Internal.OpenCL.CLCommandQueueProperties)commandQueueProperties, ref error);

            OpenCLError.Validate(error);

            return new CommandQueue(openclCommandQueue, context, device, commandQueueProperties);
        }
Exemple #3
0
        public static DeviceImage CreateFromTexture2D(UInt32 texture, Int32 mipLevel, DeviceBufferAccess access, Context context)
        {
            CLError error = CLError.None;

            CLMem mem = ManOCL.Internal.OpenCL.OpenGL.OpenCLGLDriver.clCreateFromGLTexture2D(context.CLContext, GetMemFlags(access), 3553 /* GL_TEXTURE_2D */, mipLevel, texture, ref error);

            OpenCLError.Validate(error);

            DeviceImage result = new DeviceImage(new Mem { Value = mem.Value });

            return result;
        }
Exemple #4
0
        public static DeviceSampler Create(Boolean normalizedCoords, AddressingMode addressingMode, FilterMode filterMode, Context context)
        {
            CLError error = new CLError();

            CLSampler sampler = OpenCLDriver.clCreateSampler(context.CLContext, normalizedCoords ? CLBool.True : CLBool.False, (CLAddressingMode)addressingMode, (CLFilterMode)filterMode, ref error);

            OpenCLError.Validate(error);

            return new DeviceSampler()
            {
                openCLSampler = sampler
            };
        }
Exemple #5
0
 public static DeviceImage CreateFromTexture2D(UInt32 texture, Context context)
 {
     return CreateFromTexture2D(texture, 0, DefaultDeviceBufferAccess, context);
 }
Exemple #6
0
 public static DeviceSampler Create(AddressingMode addressingMode, Context context)
 {
     return Create(DefaultNormalizedCoords, addressingMode, DefaultFilterMode, context);
 }
Exemple #7
0
 public static DeviceSampler Create(Boolean normalizedCoords, Context context)
 {
     return Create(normalizedCoords, DefaultAddressingMode, DefaultFilterMode, context);
 }
Exemple #8
0
 public static DeviceSampler Create(AddressingMode addressingMode, FilterMode filterMode, Context context)
 {
     return Create(false, addressingMode, filterMode, context);
 }
 internal void InitializeInternal(CLMem openclMem, SizeT sizeInternal, Context context, DeviceBufferAccess access)
 {
     this.Access = access;
     this.Context = context;
     this.openCLMem = openclMem;
     this.openCLMemSize = sizeInternal;
 }