Example #1
0
 public void SetUp()
 {
     _gpu = CudafyHost.GetDevice();
     _sparse = GPGPUSPARSE.Create(_gpu);
     _blas = GPGPUBLAS.Create(_gpu);
     _solver = new Solver(_gpu, _blas, _sparse);
 }
Example #2
0
 public void SetUp()
 {
     _gpu = CudafyHost.CreateDevice(CudafyModes.Target);
     _blas = GPGPUBLAS.Create(_gpu);
     _hostInput =  new float[ciROWS, ciCOLS];
     _hostInput2 = new float[ciROWS, ciCOLS];
     _hostOutput = new float[ciROWS, ciCOLS];
     _devPtr = _gpu.Allocate<float>(_hostInput);
     _devPtr2 = _gpu.Allocate<float>(_hostOutput);
 }
Example #3
0
 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);
 }
Example #4
0
        public Solver(GPGPU gpu, GPGPUBLAS blas, GPGPUSPARSE sparse)
        {
            this.gpu = gpu;
            this.blas = blas;
            this.sparse = sparse;

            var km = CudafyModule.TryDeserialize();
            if (km == null || !km.TryVerifyChecksums())
            {
                km = CudafyTranslator.Cudafy();
                km.TrySerialize();
            }

            gpu.LoadModule(km);
        }
Example #5
0
 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];
 }
Example #6
0
        public void SetUp()
        {
            _gpu = CudafyHost.GetDevice(CudafyModes.Target);
            _blas = GPGPUBLAS.Create(_gpu);

            hiMatrixAMM = new double[M * M];
            hiMatrixANN = new double[N * N];
            hiMatrixAMK = new double[M * K];
            hiMatrixAKM = new double[K * M];
            hiMatrixBMN = new double[M * N];
            hiMatrixBKN = new double[K * N];
            hiMatrixBNK = new double[N * K];
            hiMatrixBMK = new double[M * K];
            hiMatrixBKM = new double[K * M];
            hiMatrixCMN = new double[M * N];
            hiMatrixCKN = new double[K * N];
            hiMatrixCMK = new double[M * K];
            hiMatrixCMM = new double[M * M];
            gpuResultMN = new double[M * N];
            gpuResultMM = new double[M * M];
        }
Example #7
0
 public SharpBLAS(GPGPU gpu)
 {
     Gpu = gpu;
     Blas = GPGPUBLAS.Create(gpu);
     Sparse = GPGPUSPARSE.Create(gpu);
 }