aboutsummaryrefslogtreecommitdiff
path: root/matrix/cuda_helper.h
diff options
context:
space:
mode:
authorcloudygoose <[email protected]>2015-06-08 12:50:02 +0800
committercloudygoose <[email protected]>2015-06-08 12:50:02 +0800
commit155b0c0803f5f7cd3f8780273f6b0bdfbaed5970 (patch)
tree967c6326b83cda2b92eee5f597dde0e74b071dbb /matrix/cuda_helper.h
parent31330d6c095b2b11b34f524169f56dc8d18355c3 (diff)
parent0f30b1a4b5e583cb1df7dbb349c1af4378e41369 (diff)
...
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'matrix/cuda_helper.h')
-rw-r--r--matrix/cuda_helper.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/matrix/cuda_helper.h b/matrix/cuda_helper.h
index d6effdb..fde6f18 100644
--- a/matrix/cuda_helper.h
+++ b/matrix/cuda_helper.h
@@ -62,17 +62,14 @@ static const char *cublasGetErrorString(cublasStatus_t err) {
#define PROFILE_START \
do { \
- cudaEvent_t start, stop; \
- cudaEventCreate(&start); \
- cudaEventCreate(&stop); \
- cudaEventRecord(start, 0);
+ cudaEventRecord(profile_start, 0);
#define PROFILE_STOP \
- cudaEventRecord(stop, 0); \
- cudaEventSynchronize(stop); \
+ cudaEventRecord(profile_stop, 0); \
+ cudaEventSynchronize(profile_stop); \
float milliseconds = 0; \
- cudaEventElapsedTime(&milliseconds, start, stop); \
+ cudaEventElapsedTime(&milliseconds, profile_start, profile_stop); \
accu_profile(__func__, milliseconds / 1000); \
} while (0);
-#define PROFILE_END
+#define PROFILE_END
#endif