fml  0.1-0
Fused Matrix Library
gpulapack_magma.hh
1 // This file is part of fml which is released under the Boost Software
2 // License, Version 1.0. See accompanying file LICENSE or copy at
3 // https://www.boost.org/LICENSE_1_0.txt
4 
5 #ifndef FML_GPU_ARCH_GPULAPACK_MAGMA_H
6 #define FML_GPU_ARCH_GPULAPACK_MAGMA_H
7 #pragma once
8 
9 
10 #include <magma.h>
11 
12 
13 namespace gpulapack
14 {
15  namespace err
16  {
17  inline void check_ret(magma_int_t check, std::string op)
18  {
19  // if (check != CUSOLVER_STATUS_SUCCESS)
20  // {
21  // std::string msg = "cuSOLVER " + op + "() failed with error: " + get_cusolver_error_msg(check);
22  // throw std::runtime_error(msg);
23  // }
24  }
25  }
26 
27 
28 
29  inline magma_int_t getrf(magma_int_t m, magma_int_t n, magmaFloat_ptr A,
30  magma_int_t lda, magma_int_t *ipiv, magma_int_t *info)
31  {
32  return magma_sgetrf_gpu(m, n, A, lda, ipiv, info);
33  }
34 
35  inline magma_int_t getrf(magma_int_t m, magma_int_t n, magmaDouble_ptr A,
36  magma_int_t lda, magma_int_t *ipiv, magma_int_t *info)
37  {
38  return magma_dgetrf_gpu(m, n, A, lda, ipiv, info);
39  }
40 
41 
42 
43 
44 
45 }
46 
47 
48 #endif