Skip to content

Commit dbc52f2

Browse files
committed
fix
Signed-off-by: intwanghao <hao3.wang@intel.com>
1 parent e715eb4 commit dbc52f2

12 files changed

Lines changed: 184 additions & 0 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// clang-format off
2+
#include <cstddef>
3+
#include <cub/cub.cuh>
4+
5+
__device__ void test(int data) {
6+
// Start
7+
__shared__ typename cub::BlockReduce<int, 4>::TempStorage temp_storage;
8+
cub::BlockReduce<int, 4>(temp_storage).Reduce(data/*int*/, cub::Sum()/*ReduceOp*/);
9+
// End
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// clang-format off
2+
#include <cstddef>
3+
#include <cub/cub.cuh>
4+
5+
__device__ void test(int data) {
6+
// Start
7+
__shared__ typename cub::BlockReduce<int, 4>::TempStorage temp_storage;
8+
cub::BlockReduce<int, 4>(temp_storage).Sum(data/*int*/);
9+
// End
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// clang-format off
2+
#include <cstddef>
3+
#include <cub/cub.cuh>
4+
5+
__device__ void test(int input, int output, int init) {
6+
// Start
7+
__shared__ typename cub::BlockScan<int, 4>::TempStorage temp_storage;
8+
cub::BlockScan<int, 4>(temp_storage).ExclusiveScan(input/*int*/, output/*int &*/, init/*int*/, cub::Sum()/*ScanOp*/);
9+
// End
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// clang-format off
2+
#include <cstddef>
3+
#include <cub/cub.cuh>
4+
5+
__device__ void test(int input, int output) {
6+
// Start
7+
__shared__ typename cub::BlockScan<int, 4>::TempStorage temp_storage;
8+
cub::BlockScan<int, 4>(temp_storage).ExclusiveSum(input/*int*/, output/*int &*/);
9+
// End
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// clang-format off
2+
#include <cstddef>
3+
#include <cub/cub.cuh>
4+
5+
__device__ void test(int input, int output) {
6+
// Start
7+
__shared__ typename cub::BlockScan<int, 4>::TempStorage temp_storage;
8+
cub::BlockScan<int, 4>(temp_storage).InclusiveScan(input/*int*/, output/*int &*/, cub::Sum()/*ScanOp*/);
9+
// End
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// clang-format off
2+
#include <cstddef>
3+
#include <cub/cub.cuh>
4+
5+
__device__ void test(int input, int output) {
6+
// Start
7+
__shared__ typename cub::BlockScan<int, 4>::TempStorage temp_storage;
8+
cub::BlockScan<int, 4>(temp_storage).InclusiveSum(input/*int*/, output/*int &*/);
9+
// End
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// clang-format off
2+
#include <cstddef>
3+
#include <cub/cub.cuh>
4+
#include <cub/block/block_shuffle.cuh>
5+
6+
__device__ void test(int (&input)[4], int (&output)[4]) {
7+
// Start
8+
__shared__ typename cub::BlockShuffle<int, 128>::TempStorage temp_storage;
9+
cub::BlockShuffle<int, 128>(temp_storage).Down(input/*int*/, output/*int &*/);
10+
// End
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// clang-format off
2+
#include <cstddef>
3+
#include <cub/cub.cuh>
4+
#include <cub/block/block_shuffle.cuh>
5+
6+
__device__ void test(int input, int output, int distance) {
7+
// Start
8+
__shared__ typename cub::BlockShuffle<int, 128>::TempStorage temp_storage;
9+
cub::BlockShuffle<int, 128>(temp_storage).Offset(input/*int*/, output/*int &*/, distance/*int*/);
10+
// End
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// clang-format off
2+
#include <cstddef>
3+
#include <cub/cub.cuh>
4+
#include <cub/block/block_shuffle.cuh>
5+
6+
__device__ void test(int input, int output, unsigned int distance) {
7+
// Start
8+
__shared__ typename cub::BlockShuffle<int, 128>::TempStorage temp_storage;
9+
cub::BlockShuffle<int, 128>(temp_storage).Rotate(input/*int*/, output/*int &*/, distance/*unsigned int*/);
10+
// End
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// clang-format off
2+
#include <cstddef>
3+
#include <cub/cub.cuh>
4+
#include <cub/block/block_shuffle.cuh>
5+
6+
__device__ void test(int (&input)[4], int (&output)[4]) {
7+
// Start
8+
__shared__ typename cub::BlockShuffle<int, 128>::TempStorage temp_storage;
9+
cub::BlockShuffle<int, 128>(temp_storage).Up(input/*int*/, output/*int &*/);
10+
// End
11+
}

0 commit comments

Comments
 (0)