mat_utils.hpp 1.1 KB

1234567891011121314151617181920212223242526
  1. #ifndef _SCTL_MAT_UTILS_
  2. #define _SCTL_MAT_UTILS_
  3. #include <sctl/common.hpp>
  4. namespace SCTL_NAMESPACE {
  5. namespace mat {
  6. template <class ValueType> void gemm(char TransA, char TransB, int M, int N, int K, ValueType alpha, Iterator<ValueType> A, int lda, Iterator<ValueType> B, int ldb, ValueType beta, Iterator<ValueType> C, int ldc);
  7. template <class ValueType> void cublasgemm(char TransA, char TransB, int M, int N, int K, ValueType alpha, Iterator<ValueType> A, int lda, Iterator<ValueType> B, int ldb, ValueType beta, Iterator<ValueType> C, int ldc);
  8. template <class ValueType> void svd(char *JOBU, char *JOBVT, int *M, int *N, Iterator<ValueType> A, int *LDA, Iterator<ValueType> S, Iterator<ValueType> U, int *LDU, Iterator<ValueType> VT, int *LDVT, Iterator<ValueType> WORK, int *LWORK, int *INFO);
  9. /**
  10. * \brief Computes the pseudo inverse of matrix M(n1xn2) (in row major form)
  11. * and returns the output M_(n2xn1).
  12. */
  13. template <class ValueType> void pinv(Iterator<ValueType> M, int n1, int n2, ValueType eps, Iterator<ValueType> M_);
  14. } // end namespace mat
  15. } // end namespace SCTL_NAMESPACE
  16. #include SCTL_INCLUDE(mat_utils.txx)
  17. #endif //_SCTL_MAT_UTILS_