Skip to content

[SYCLomatic] Add query api mapping for 22 cub blocklevel API #2900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: SYCLomatic
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockExchange$$BlockedToStriped.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int (&thread_data)[4]) {
// Start
__shared__ typename cub::BlockExchange<int, 128, 4>::TempStorage temp_storage;
cub::BlockExchange<int, 128, 4>(temp_storage).BlockedToStriped(thread_data/*int(&)[4]*/, thread_data/*int(&)[4]*/);
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int (&thread_data)[4]) {
// Start
__shared__ typename cub::BlockExchange<int, 128, 4>::TempStorage temp_storage;
cub::BlockExchange<int, 128, 4>(temp_storage).BlockedToWarpStriped(thread_data/*int(&)[4]*/, thread_data/*int(&)[4]*/);
// End
}
10 changes: 10 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockExchange$$ScatterToBlocked.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int (&thread_data)[4], int (&thread_rank)[4]) {
// Start
__shared__ typename cub::BlockExchange<int, 128, 4>::TempStorage temp_storage;
cub::BlockExchange<int, 128, 4>(temp_storage).ScatterToBlocked(thread_data/*int(&)[4]*/, thread_rank/*int(&)[4]*/);
// End
}
10 changes: 10 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockExchange$$ScatterToStriped.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int (&thread_data)[4], int (&thread_rank)[4]) {
// Start
__shared__ typename cub::BlockExchange<int, 128, 4>::TempStorage temp_storage;
cub::BlockExchange<int, 128, 4>(temp_storage).ScatterToStriped(thread_data/*int(&)[4]*/, thread_rank/*int(&)[4]*/);
// End
}
10 changes: 10 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockExchange$$StripedToBlocked.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int (&thread_data)[4]) {
// Start
__shared__ typename cub::BlockExchange<int, 128, 4>::TempStorage temp_storage;
cub::BlockExchange<int, 128, 4>(temp_storage).StripedToBlocked(thread_data/*int(&)[4]*/, thread_data/*int(&)[4]*/);
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int (&thread_data)[4]) {
// Start
__shared__ typename cub::BlockExchange<int, 128, 4>::TempStorage temp_storage;
cub::BlockExchange<int, 128, 4>(temp_storage).WarpStripedToBlocked(thread_data/*int(&)[4]*/, thread_data/*int(&)[4]*/);
// End
}
12 changes: 12 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockLoad$$Load.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int *src, int (&thread_data)[4], int end, int default_value) {
// Start
__shared__ typename cub::BlockLoad<int, 128, 4, cub::BLOCK_LOAD_DIRECT>::TempStorage temp_storage;
cub::BlockLoad<int, 128, 4, cub::BLOCK_LOAD_DIRECT>(temp_storage).Load(src/*int **/, thread_data/*int(&)[4]*/);
cub::BlockLoad<int, 128, 4, cub::BLOCK_LOAD_DIRECT>(temp_storage).Load(src/*int **/, thread_data/*int(&)[4]*/, end/*int*/);
cub::BlockLoad<int, 128, 4, cub::BLOCK_LOAD_DIRECT>(temp_storage).Load(src/*int **/, thread_data/*int(&)[4]*/, end/*int*/, default_value/*int*/);
// End
}
10 changes: 10 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockRadixSort::Sort.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int (&thread_data)[4]) {
// Start
__shared__ typename cub::BlockRadixSort<int, 128, 4>::TempStorage temp_storage;
cub::BlockRadixSort<int, 128, 4>(temp_storage).Sort(thread_data/*int(&)[4]*/);
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int (&thread_data)[4]) {
// Start
__shared__ typename cub::BlockRadixSort<int, 128, 4>::TempStorage temp_storage;
cub::BlockRadixSort<int, 128, 4>(temp_storage).SortBlockedToStriped(thread_data/*int(&)[4]*/);
// End
}
10 changes: 10 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockRadixSort::SortDescending.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int (&thread_data)[4]) {
// Start
__shared__ typename cub::BlockRadixSort<int, 128, 4>::TempStorage temp_storage;
cub::BlockRadixSort<int, 128, 4>(temp_storage).SortDescending(thread_data/*int(&)[4]*/);
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int (&thread_data)[4]) {
// Start
__shared__ typename cub::BlockRadixSort<int, 128, 4>::TempStorage temp_storage;
cub::BlockRadixSort<int, 128, 4>(temp_storage).SortDescendingBlockedToStriped(thread_data/*int(&)[4]*/);
// End
}
10 changes: 10 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockReduce$$Reduce.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int data) {
// Start
__shared__ typename cub::BlockReduce<int, 4>::TempStorage temp_storage;
cub::BlockReduce<int, 4>(temp_storage).Reduce(data/*int*/, cub::Sum()/*ReduceOp*/);
// End
}
10 changes: 10 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockReduce$$Sum.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int data) {
// Start
__shared__ typename cub::BlockReduce<int, 4>::TempStorage temp_storage;
cub::BlockReduce<int, 4>(temp_storage).Sum(data/*int*/);
// End
}
10 changes: 10 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockScan$$ExclusiveScan.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int input, int output, int init) {
// Start
__shared__ typename cub::BlockScan<int, 4>::TempStorage temp_storage;
cub::BlockScan<int, 4>(temp_storage).ExclusiveScan(input/*int*/, output/*int &*/, init/*int*/, cub::Sum()/*ScanOp*/);
// End
}
10 changes: 10 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockScan$$ExclusiveSum.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int input, int output) {
// Start
__shared__ typename cub::BlockScan<int, 4>::TempStorage temp_storage;
cub::BlockScan<int, 4>(temp_storage).ExclusiveSum(input/*int*/, output/*int &*/);
// End
}
10 changes: 10 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockScan$$InclusiveScan.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int input, int output) {
// Start
__shared__ typename cub::BlockScan<int, 4>::TempStorage temp_storage;
cub::BlockScan<int, 4>(temp_storage).InclusiveScan(input/*int*/, output/*int &*/, cub::Sum()/*ScanOp*/);
// End
}
10 changes: 10 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockScan$$InclusiveSum.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int input, int output) {
// Start
__shared__ typename cub::BlockScan<int, 4>::TempStorage temp_storage;
cub::BlockScan<int, 4>(temp_storage).InclusiveSum(input/*int*/, output/*int &*/);
// End
}
11 changes: 11 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockShuffle$$Down.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>
#include <cub/block/block_shuffle.cuh>

__device__ void test(int (&input)[4], int (&output)[4]) {
// Start
__shared__ typename cub::BlockShuffle<int, 128>::TempStorage temp_storage;
cub::BlockShuffle<int, 128>(temp_storage).Down(input/*int*/, output/*int &*/);
// End
}
11 changes: 11 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockShuffle$$Offset.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>
#include <cub/block/block_shuffle.cuh>

__device__ void test(int input, int output, int distance) {
// Start
__shared__ typename cub::BlockShuffle<int, 128>::TempStorage temp_storage;
cub::BlockShuffle<int, 128>(temp_storage).Offset(input/*int*/, output/*int &*/, distance/*int*/);
// End
}
11 changes: 11 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockShuffle$$Rotate.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>
#include <cub/block/block_shuffle.cuh>

__device__ void test(int input, int output, unsigned int distance) {
// Start
__shared__ typename cub::BlockShuffle<int, 128>::TempStorage temp_storage;
cub::BlockShuffle<int, 128>(temp_storage).Rotate(input/*int*/, output/*int &*/, distance/*unsigned int*/);
// End
}
11 changes: 11 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockShuffle$$Up.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>
#include <cub/block/block_shuffle.cuh>

__device__ void test(int (&input)[4], int (&output)[4]) {
// Start
__shared__ typename cub::BlockShuffle<int, 128>::TempStorage temp_storage;
cub::BlockShuffle<int, 128>(temp_storage).Up(input/*int*/, output/*int &*/);
// End
}
11 changes: 11 additions & 0 deletions clang/examples/DPCT/CUB/cub$$BlockStore$$Store.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// clang-format off
#include <cstddef>
#include <cub/cub.cuh>

__device__ void test(int *dst, int (&thread_data)[4], int end) {
// Start
__shared__ typename cub::BlockStore<int, 128, 4, cub::BLOCK_STORE_DIRECT>::TempStorage temp_storage;
cub::BlockStore<int, 128, 4, cub::BLOCK_STORE_DIRECT>(temp_storage).Store(dst/*int **/, thread_data/*int(&)[4]*/);
cub::BlockStore<int, 128, 4, cub::BLOCK_STORE_DIRECT>(temp_storage).Store(dst/*int **/, thread_data/*int(&)[4]*/, end/*int*/);
// End
}
Loading