/// <inheritdoc cref="AcceleratorObject.DisposeAcceleratorObject(bool)"/> protected override void DisposeAcceleratorObject(bool disposing) { if (disposing) { tempBuffer.Dispose(); } }
public void CleanupGPURepeat() { _display?.Dispose(); _display = null; _area?.Dispose(); _area = null; _output?.Dispose(); _output = null; }
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); } }