-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathsingle_task.hpp
More file actions
36 lines (24 loc) · 755 Bytes
/
Copy pathsingle_task.hpp
File metadata and controls
36 lines (24 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
/**
@file taskflow/cuda/algorithm/single_task.hpp
@brief cuda single-task algorithms include file
*/
namespace tf {
/** @private */
template <typename C>
__global__ void cuda_single_task(C callable) {
callable();
}
// Function: single_task
template <typename Creator, typename Deleter>
template <typename C>
cudaTask cudaGraphBase<Creator, Deleter>::single_task(C c) {
return kernel(1, 1, 0, cuda_single_task<C>, c);
}
// Function: single_task
template <typename Creator, typename Deleter>
template <typename C>
void cudaGraphExecBase<Creator, Deleter>::single_task(cudaTask task, C c) {
return kernel(task, 1, 1, 0, cuda_single_task<C>, c);
}
} // end of namespace tf -----------------------------------------------------