Ejemplo n.º 1
0
 public void CleanupGPURepeat()
 {
     _display?.Dispose();
     _display = null;
     _area?.Dispose();
     _area = null;
     _output?.Dispose();
     _output = null;
 }
Ejemplo n.º 2
0
 public void InitGPURepeat(ref int[] buffer, int[] displayPort, float[] viewArea, int max_iterations)
 {
     if (!_disposing)
     {
         _computing  = true;
         _buffersize = buffer.Length;
         _area       = _accelerator.Allocate1D <float>(viewArea);
         _output     = _accelerator.Allocate1D <int>(_buffersize);
         _display    = _accelerator.Allocate1D <int>(displayPort);
         _computing  = false;
     }
 }
Ejemplo n.º 3
0
        public void InitGPU(ref int[] buffer, int[] displayPort, float[] viewArea, int max_iterations)
        {
            if (IsActive && !_disposing)
            {
                // release current buffers if they exist
                _display?.Dispose();
                _area?.Dispose();
                _output?.Dispose();

                _buffersize = buffer.Length;

                _iterations = max_iterations;

                _area = _stream.Accelerator.Allocate1D <float>(viewArea);

                _display = _stream.Accelerator.Allocate1D <int>(displayPort);

                _output = _stream.Accelerator.Allocate1D <int>(_buffersize);
            }
        }
Ejemplo n.º 4
0
 internal ScanProvider(Accelerator accelerator, LongIndex1D dataLength)
     : base(accelerator)
 {
     tempBuffer = accelerator.Allocate1D <int>(dataLength);
 }