public GpuContext(Gpu gpu, bool useDefaultStream = false) { Device = Device.GpuDevice(gpu); Gpu = gpu; if (useDefaultStream) { throw new NotImplementedException("TODO: add default stream support."); } else { Stream = gpu.CreateStream(); if (Alea.cuDNN.Dnn.IsAvailable) { Dnn = new Alea.cuDNN.Dnn(Stream); } if (Alea.cuBLAS.Blas.IsAvailable) { Blas = new Alea.cuBLAS.Blas(Stream); } } }