public void CleanupGPURepeat() { _display?.Dispose(); _display = null; _area?.Dispose(); _area = null; _output?.Dispose(); _output = null; }
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; } }
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); } }
internal ScanProvider(Accelerator accelerator, LongIndex1D dataLength) : base(accelerator) { tempBuffer = accelerator.Allocate1D <int>(dataLength); }