Files
project_6/cccl_upstream/thrust/testing/catch2_test_minimum_system.cu
EngineX CI 56fd68e7dd [INFRA] Import NVIDIA/CCCL upstream as optimization reference library
CCCL (CUDA C++ Core Libraries) provides:
- CUB: device/block/warp-level GPU primitives (reduce, scan, sort, topk)
- Thrust: high-level parallel algorithms (transform_reduce, sort, scan)
- libcudacxx: CUDA C++ standard library (atomics, barriers, memory)
- cudax: experimental features (memory resources, allocators)
- Tuning policies: per-SM hardware-specific algorithm parameters

Competition optimization vectors mapped to CCCL:
- Output TPS (83% weight): warp_reduce, block_reduce, device_topk
- Input TPS (14% weight): device_scan, block_load, prefetch
- Cache TPS (3% weight): prefix caching strategy patterns
- Memory (0.9 util): pooled/cached/buddy allocators

Source: https://github.com/NVIDIA/cccl (shallow clone, HEAD only)
License: Apache-2.0
2026-07-30 09:35:51 +00:00

32 lines
1.0 KiB
Plaintext

#include <thrust/iterator/detail/minimum_system.h>
#include <cuda/std/type_traits>
#include "catch2_test_helper.h"
template <typename System, typename SeqSystem>
void check()
{
STATIC_REQUIRE(cuda::std::is_convertible_v<System, SeqSystem>);
STATIC_REQUIRE(!cuda::std::is_convertible_v<SeqSystem, System>);
STATIC_REQUIRE(cuda::std::is_same_v<thrust::detail::minimum_system_t<SeqSystem, System>, SeqSystem>);
STATIC_REQUIRE(cuda::std::is_same_v<thrust::detail::minimum_system_t<System, SeqSystem>, SeqSystem>);
}
TEST_CASE("host and device systems convert to sequential", "[minimum_system]")
{
using seq = decltype(thrust::seq);
using seq_tag = decltype(thrust::seq)::tag_type;
using dev = decltype(thrust::device);
using dev_tag = thrust::device_system_tag;
using host = decltype(thrust::host);
using host_tag = thrust::host_system_tag;
check<dev, seq>();
check<dev_tag, seq>();
check<dev, seq_tag>();
check<dev_tag, seq_tag>();
check<host, seq_tag>();
check<host_tag, seq_tag>();
}