diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2018-01-16 14:22:07 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2018-01-16 14:22:07 +0300 |
commit | 79167a699fa6c0b30c506d0d892f8b3f1c4fa8ec (patch) | |
tree | d5e0cceab9e9846cc04e1f00440c58e180f7d4ec | |
parent | 8cd291bf30f35887157b9b13327debb63f9025df (diff) |
add Row()
-rw-r--r-- | src/amun/gpu/mblas/matrix_wrapper.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/amun/gpu/mblas/matrix_wrapper.h b/src/amun/gpu/mblas/matrix_wrapper.h index aecb5729..4e50a9aa 100644 --- a/src/amun/gpu/mblas/matrix_wrapper.h +++ b/src/amun/gpu/mblas/matrix_wrapper.h @@ -1,5 +1,6 @@ #pragma once #include "matrix.h" +#include "vector_wrapper.h" namespace amunmt { namespace GPU { @@ -268,6 +269,14 @@ public: return ind; } + __device__ + VectorWrapper<T> Row(unsigned row) + { + T &ele = (*this)(row); + VectorWrapper<T> ret(&ele, dim(1)); + return ret; + } + std::string Debug() const { std::stringstream strm; |