Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
14 changes: 14 additions & 0 deletions clang/examples/DPCT/Runtime/cooperative_groups$$bit_and.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "cooperative_groups.h"
#include <cooperative_groups/reduce.h>

__global__ void test() {
int *sdata;
cooperative_groups::thread_block cta =
cooperative_groups::this_thread_block();
const unsigned int tid = cta.thread_rank();
cooperative_groups::thread_block_tile<32> tile32 = cooperative_groups::tiled_partition<32>(cta);
int *idata;
// Start
cooperative_groups::reduce(tile32 /*thread_block_tile<32>*/, sdata[tid]/*data*/, cooperative_groups::bit_and<int>()/*cg::bit_and<T>*/);
// End
}
14 changes: 14 additions & 0 deletions clang/examples/DPCT/Runtime/cooperative_groups$$bit_or.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "cooperative_groups.h"
#include <cooperative_groups/reduce.h>

__global__ void test() {
int *sdata;
cooperative_groups::thread_block cta =
cooperative_groups::this_thread_block();
const unsigned int tid = cta.thread_rank();
cooperative_groups::thread_block_tile<32> tile32 = cooperative_groups::tiled_partition<32>(cta);
int *idata;
// Start
cooperative_groups::reduce(tile32 /*thread_block_tile<32>*/, sdata[tid]/*data*/, cooperative_groups::bit_or<int>()/*cg::bit_or<T>*/);
// End
}
14 changes: 14 additions & 0 deletions clang/examples/DPCT/Runtime/cooperative_groups$$bit_xor.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "cooperative_groups.h"
#include <cooperative_groups/reduce.h>

__global__ void test() {
int *sdata;
cooperative_groups::thread_block cta =
cooperative_groups::this_thread_block();
const unsigned int tid = cta.thread_rank();
cooperative_groups::thread_block_tile<32> tile32 = cooperative_groups::tiled_partition<32>(cta);
int *idata;
// Start
cooperative_groups::reduce(tile32 /*thread_block_tile<32>*/, sdata[tid]/*data*/, cooperative_groups::bit_xor<int>()/*cg::bit_xor<T>*/);
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Option: --use-experimental-features=non-uniform-groups
#include <cooperative_groups.h>

__global__ void test() {

// Start
cooperative_groups::coalesced_group active = cooperative_groups::coalesced_threads();
active.shfl(0, 0);
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Option: --use-experimental-features=non-uniform-groups
#include <cooperative_groups.h>

__global__ void test() {

// Start
cooperative_groups::coalesced_group active = cooperative_groups::coalesced_threads();
active.size();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Option: --use-experimental-features=non-uniform-groups
#include <cooperative_groups.h>

__global__ void test() {
// Start
cooperative_groups::coalesced_group active = cooperative_groups::coalesced_threads();
active.sync();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Option: --use-experimental-features=non-uniform-groups
#include <cooperative_groups.h>


__global__ void test() {
// Start
cooperative_groups::coalesced_group active =
cooperative_groups::coalesced_threads();
active.thread_rank();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Option: --use-experimental-features=non-uniform-groups
#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>

__global__ void test() {
// Start
cooperative_groups::coalesced_group active = cooperative_groups::coalesced_threads();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {
double *sdata;
cooperative_groups::thread_block cta =
cooperative_groups::this_thread_block();
const unsigned int tid = cta.thread_rank();
cooperative_groups::thread_block_tile<32> tile32 =
cooperative_groups::tiled_partition<32>(cta);
// Start
cooperative_groups::exclusive_scan(
tile32 /* type group */, sdata[tid] /* type value */,
cooperative_groups::plus<double>() /* type operator */);
cooperative_groups::exclusive_scan(tile32 /* type group */,
sdata[tid] /* type value */);
// End
}
14 changes: 14 additions & 0 deletions clang/examples/DPCT/Runtime/cooperative_groups$$greater.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "cooperative_groups.h"
#include <cooperative_groups/reduce.h>

__global__ void test() {
double *sdata;
cooperative_groups::thread_block cta =
cooperative_groups::this_thread_block();
const unsigned int tid = cta.thread_rank();
cooperative_groups::thread_block_tile<32> tile32 = cooperative_groups::tiled_partition<32>(cta);
int *idata;
// Start
cooperative_groups::reduce(tile32 /*thread_block_tile<32>*/, sdata[tid]/*data*/, cooperative_groups::greater<double>()/*cg::greater<T>*/);
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Option: --use-experimental-features=nd_range_barrier,root-group
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {

// Start
cooperative_groups::grid_group grid = cooperative_groups::this_grid();
grid.block_rank();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Option: --use-experimental-features=nd_range_barrier,root-group
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {

// Start
cooperative_groups::grid_group grid = cooperative_groups::this_grid();
grid.num_blocks();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Option: --use-experimental-features=nd_range_barrier,root-group

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Option: --use-experimental-features=nd_range_barrier,root-group
// Option: --use-experimental-features=root-group

#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {

// Start
cooperative_groups::grid_group grid = cooperative_groups::this_grid();
grid.num_threads();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Option: --use-experimental-features=nd_range_barrier,root-group
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {

// Start
cooperative_groups::grid_group grid = cooperative_groups::this_grid();
grid.size();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Option: --use-experimental-features=nd_range_barrier,root-group
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {

// Start
cooperative_groups::grid_group grid = cooperative_groups::this_grid();
grid.sync();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <cooperative_groups.h>

__global__ void test() {

// Start
cooperative_groups::grid_group grid = cooperative_groups::this_grid();
grid.thread_rank() /* grid_group::thread_rank */;
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {
double *sdata;
cooperative_groups::thread_block cta =
cooperative_groups::this_thread_block();
const unsigned int tid = cta.thread_rank();
cooperative_groups::thread_block_tile<32> tile32 =
cooperative_groups::tiled_partition<32>(cta);

// Start
cooperative_groups::inclusive_scan(
tile32 /* type group */, sdata[tid] /* type value */,
cooperative_groups::plus<double>() /* type operator */);

cooperative_groups::inclusive_scan(tile32 /* type group */,
sdata[tid] /* type value */);

// End
}
14 changes: 14 additions & 0 deletions clang/examples/DPCT/Runtime/cooperative_groups$$less.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "cooperative_groups.h"
#include <cooperative_groups/reduce.h>

__global__ void test() {
double *sdata;
cooperative_groups::thread_block cta =
cooperative_groups::this_thread_block();
const unsigned int tid = cta.thread_rank();
cooperative_groups::thread_block_tile<32> tile32 = cooperative_groups::tiled_partition<32>(cta);
int *idata;
// Start
cooperative_groups::reduce(tile32 /*thread_block_tile<32>*/, sdata[tid]/*data*/, cooperative_groups::less<double>()/*cg::less<T>*/);
// End
}
14 changes: 14 additions & 0 deletions clang/examples/DPCT/Runtime/cooperative_groups$$plus.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "cooperative_groups.h"
#include <cooperative_groups/reduce.h>

__global__ void test() {
double *sdata;
cooperative_groups::thread_block cta =
cooperative_groups::this_thread_block();
const unsigned int tid = cta.thread_rank();
cooperative_groups::thread_block_tile<32> tile32 = cooperative_groups::tiled_partition<32>(cta);
int *idata;
// Start
cooperative_groups::reduce(tile32 /*thread_block_tile<32>*/, sdata[tid]/*data*/, cooperative_groups::plus<double>()/*cg::plus<T>*/);
// End
}
16 changes: 16 additions & 0 deletions clang/examples/DPCT/Runtime/cooperative_groups$$sync.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Option: --use-experimental-features=logical-group
#include "cooperative_groups.h"
#include <cooperative_groups/reduce.h>

__global__ void test() {

// Start
cooperative_groups::thread_block tb = cooperative_groups::this_thread_block();
cooperative_groups::thread_block_tile<32> tbt32 =
cooperative_groups::tiled_partition<32>(tb);
tb.sync();
tbt32.sync();
cooperative_groups::sync(tb);
cooperative_groups::sync(tbt32);
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Option: --use-experimental-features=root-group
#include "cooperative_groups.h"
#include <cooperative_groups/reduce.h>

__global__ void test() {
// Start
cooperative_groups::grid_group grid = cooperative_groups::this_grid();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Option: --use-experimental-features=logical-group
#include "cooperative_groups.h"
#include <cooperative_groups/reduce.h>

__global__ void test() {
// Start
auto thread = cooperative_groups::this_thread();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {

// Start
cooperative_groups::thread_block tb = cooperative_groups::this_thread_block();
tb.thread_index();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {

// Start
cooperative_groups::thread_block tb = cooperative_groups::this_thread_block();

tb.num_threads();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {
// Start
cooperative_groups::thread_block tb = cooperative_groups::this_thread_block();
tb.size();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {

// Start
cooperative_groups::thread_block tb = cooperative_groups::this_thread_block();
tb.sync();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {

// Start
cooperative_groups::thread_block tb =
cooperative_groups::this_thread_block();
tb.sync();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {

// Start
cooperative_groups::thread_block tb = cooperative_groups::this_thread_block();
tb.thread_rank();
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {

cooperative_groups::thread_block block = cooperative_groups::this_thread_block();
cooperative_groups::thread_block_tile<32> ctile32 = cooperative_groups::tiled_partition<32>(block);

// Start
ctile32.meta_group_rank();// thread_block_tile<tile size>::meta_group_rank
// End
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <cooperative_groups.h>
#include <cooperative_groups/scan.h>

__global__ void test() {

cooperative_groups::thread_block block =
cooperative_groups::this_thread_block();

// Start
cooperative_groups::thread_block_tile<32> ctile32 =
cooperative_groups::tiled_partition<32>(block);
ctile32.meta_group_size();
// End
}
Loading
Loading