public void SetUp() { _gpu = CudafyHost.CreateDevice(CudafyModes.Target); _blas = GPGPUBLAS.Create(_gpu); Console.Write("BLAS Version={0}", _blas.GetVersion()); _hostInput1 = new float[ciN]; _hostInput2 = new float[ciN]; _hostOutput1 = new float[ciN]; _hostOutput2 = new float[ciN]; _devPtr1 = _gpu.Allocate <float>(_hostInput1); _devPtr2 = _gpu.Allocate <float>(_hostOutput1); }
public void SetUp() { _gpu = CudafyHost.GetDevice(CudafyModes.Target); _blas = GPGPUBLAS.Create(_gpu); Console.Write("BLAS Version={0}", _blas.GetVersion()); // Initialize CPU Buffer hiMatrixA = new double[M * N]; hiMatrixANN = new double[N * N]; hiMatrixACBC = new double[(KL + KU + 1) * N]; hiMatrixASCBC = new double[(K + 1) * N]; hiMatrixAPS = new double[(N * (N + 1)) / 2]; hiVectorXM = new double[M]; hiVectorXN = new double[N]; hiVectorYM = new double[M]; hiVectorYN = new double[N]; gpuResultM = new double[M]; gpuResultN = new double[N]; gpuResultMN = new double[M * N]; gpuResultNN = new double[N * N]; gpuResultP = new double[(N * (N + 1)) / 2]; }