Files
project_6/cccl_upstream/cudax/test/execution/test_concepts.cu
muh-bot dedf08166a [CCCL] Add missing CCCL components: c2h, nvbench_helper, cmake, cudax, AGENTS.md
Added 863 files from NVIDIA/cccl sparse checkout:
- c2h/ (27 files): Catch2 test helpers — generators, validators, runner
- nvbench_helper/ (10 files): Benchmark harness utilities
- cmake/ (29 files): CMake presets and build helpers
- cudax/ (794 files): Experimental CUDA extensions
- AGENTS.md: NVIDIA's official AI agent instructions for CCCL
- CMakePresets.json: Standardized build configurations
- cccl-version.json: Version tracking

Also added CCCL_ASSET_MAP.md mapping all 4295 CCCL files to
competition value and PRD items.

cccl_upstream now covers 100% of competition-critical assets:
- 27 tuning headers (SM80/90/100 benchmark data)
- 32 dispatch headers (algorithm implementations)
- 60 Thrust examples (correctness verification)
- 217 CUB Catch2 tests (regression matrix)
- 153 CUB benchmarks (parameter space search)
- 18 CUB examples (API verification)
- 27 test helpers + benchmark harness
- 794 cudax experimental extensions
2026-08-06 02:14:18 +00:00

87 lines
2.6 KiB
Plaintext

//===----------------------------------------------------------------------===//
//
// Part of CUDA Experimental in CUDA C++ Core Libraries,
// under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
//
//===----------------------------------------------------------------------===//
#include <cuda/experimental/execution.cuh>
#include "common/dummy_scheduler.cuh"
#include "testing.cuh" // IWYU pragma: keep
namespace ex = ::cuda::experimental::execution;
struct not_a_receiver
{};
struct a_receiver
{
using receiver_concept = ex::receiver_t;
a_receiver(a_receiver&&) = default;
void set_value(int) && noexcept {}
void set_stopped() && noexcept {}
};
C2H_TEST("tests for the receiver concepts", "[concepts]")
{
static_assert(!ex::receiver<not_a_receiver>);
static_assert(ex::receiver<a_receiver>);
using yes_completions = ex::completion_signatures<ex::set_value_t(int), ex::set_stopped_t()>;
static_assert(ex::receiver_of<a_receiver, yes_completions>);
using no_completions =
ex::completion_signatures<ex::set_value_t(int), ex::set_stopped_t(), ex::set_error_t(ex::exception_ptr)>;
static_assert(!ex::receiver_of<a_receiver, no_completions>);
}
struct not_a_sender
{};
struct a_sender
{
using sender_concept = ex::sender_t;
template <class _Self>
static constexpr auto get_completion_signatures()
{
return ex::completion_signatures<ex::set_value_t(int), ex::set_stopped_t()>{};
}
};
struct non_constexpr_complsigs
{
using sender_concept = ex::sender_t;
template <class _Self, class...>
_CCCL_HOST_DEVICE static auto get_completion_signatures()
{
return ex::completion_signatures<ex::set_value_t(int), ex::set_stopped_t()>{};
}
};
C2H_TEST("tests for the sender concepts", "[concepts]")
{
static_assert(!ex::sender<not_a_sender>);
static_assert(ex::sender<a_sender>);
static_assert(ex::sender_in<a_sender>);
static_assert(ex::sender_in<a_sender, ex::env<>>);
static_assert(ex::sender<non_constexpr_complsigs>);
static_assert(!ex::sender_in<non_constexpr_complsigs>);
static_assert(!ex::sender_in<non_constexpr_complsigs, ex::env<>>);
[[maybe_unused]] auto read_env = ex::read_env(ex::get_scheduler);
using read_env_t = decltype(read_env);
static_assert(ex::sender<read_env_t>);
static_assert(!ex::sender_in<read_env_t>);
static_assert(!ex::sender_in<read_env_t, ex::env<>>);
static_assert(ex::sender_in<read_env_t, ex::prop<ex::get_scheduler_t, dummy_scheduler<>>>);
}