public void EnqueueFillBuffer()
        {
            var fillEventId = OclHelper.EnqueueFillBuffer <int>(_queueId, _bufferId, _pattern.AsSpan());

            OclHelper.Finish(_queueId);
            OclHelper.ReleaseEvent(fillEventId);
        }
 public void Setup()
 {
     _platformId = OclHelper.GetPlatforms().First();
     _deviceId   = OclHelper.GetDevicesForPlatform(_platformId).First();
     _contextId  = OclHelper.CreateContext(_platformId, new[] { _deviceId });
     _queueId    = OclHelper.CreateCommandQueue(_contextId, _deviceId);
     _bufferId   = OclHelper.CreateBuffer <int>(_contextId, 1200 * 1920);
     _pattern    = new int[1] {
         13
     };
 }
        public async Task Setup()
        {
            _platformId = OclHelper.GetPlatforms().First();
            _deviceId   = OclHelper.GetDevicesForPlatform(_platformId).First();
            _contextId  = OclHelper.CreateContext(_platformId, new[] { _deviceId });
            _queueId    = OclHelper.CreateCommandQueue(_contextId, _deviceId);
            _programId  = OclHelper.CreateProgram(_contextId, Kernels.multiply);

            await OclHelper.BuildProgram(_programId, _deviceId);

            _kernelId = OclHelper.CreateKernel(_programId, "multiply");
        }
 public void Cleanup()
 {
     OclHelper.ReleaseMemObject(_bufferId);
     OclHelper.ReleaseCommandQueue(_queueId);
     OclHelper.ReleaseContext(_contextId);
 }
 public void GetKernelWorkGroupSize()
 {
     WorkGroupSize = OclHelper.GetKernelWorkGroupSize(_kernelId, _deviceId);
 }
 public void GetCommandQueueDevice()
 {
     DeviceId = OclHelper.GetCommandQueueDevice(_queueId);
 }
 public void GetCommandQueueContext()
 {
     ContextId = OclHelper.GetCommandQueueContext(_queueId);
 }
 public void GetDevicesForPlatform()
 {
     DeviceIds = OclHelper.GetDevicesForPlatform(_platformId);
 }
 public void GetDeviceExtensions()
 {
     Extensions = OclHelper.GetDeviceExtensions(_deviceId);
 }
 public void GetPlatformExtensions()
 {
     Extensions = OclHelper.GetPlatformExtensions(_platformId);
 }
 public void GetPlatforms()
 {
     PlatformIds = OclHelper.GetPlatforms();
 }
 public void Cleanup()
 {
     OclHelper.ReleaseKernel(_kernelId);
     OclHelper.ReleaseCommandQueue(_queueId);
     OclHelper.ReleaseContext(_contextId);
 }