diff options
author | Determinant <[email protected]> | 2015-08-14 15:02:34 +0800 |
---|---|---|
committer | Determinant <[email protected]> | 2015-08-14 15:02:34 +0800 |
commit | 4b3e8591816e553a4409f5fa95f5983e59ff711f (patch) | |
tree | 8b757fb63767bc1463b8df23dd1cf24949608cf8 /nerv/lib/matrix | |
parent | 7082ba094be6ccbf97cfaf893ea437f31ced197b (diff) |
add profiling for copy_rows_fromh_by_idx
Diffstat (limited to 'nerv/lib/matrix')
-rw-r--r-- | nerv/lib/matrix/generic/cumatrix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nerv/lib/matrix/generic/cumatrix.c b/nerv/lib/matrix/generic/cumatrix.c index 40a0030..2cb3563 100644 --- a/nerv/lib/matrix/generic/cumatrix.c +++ b/nerv/lib/matrix/generic/cumatrix.c @@ -321,6 +321,7 @@ void nerv_matrix_(copy_rows_fromh_by_idx)(Matrix *a, const Matrix *b, NERV_EXIT_STATUS(status, MAT_IDX_VECTOR_EXP, 0); if (a->ncol != b->ncol) NERV_EXIT_STATUS(status, MAT_MISMATCH_DIM, 0); + PROFILE_START cudaStream_t *streams = (cudaStream_t*)malloc(sizeof(cudaStream_t) * nrow); for (i = 0; i < nrow; i++) { @@ -339,6 +340,7 @@ void nerv_matrix_(copy_rows_fromh_by_idx)(Matrix *a, const Matrix *b, CUDA_SAFE_CALL(cudaStreamDestroy(streams[i]), status); } free(streams); + PROFILE_STOP NERV_SET_STATUS(status, NERV_NORMAL, 0); } |