[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
This commit is contained in:
46
cccl_upstream/thrust/testing/unittest_tester.cu
Normal file
46
cccl_upstream/thrust/testing/unittest_tester.cu
Normal file
@@ -0,0 +1,46 @@
|
||||
#include <unittest/unittest.h>
|
||||
|
||||
void TestAssertEqual()
|
||||
{
|
||||
ASSERT_EQUAL(0, 0);
|
||||
ASSERT_EQUAL(1, 1);
|
||||
ASSERT_EQUAL(-15.0f, -15.0f);
|
||||
}
|
||||
DECLARE_UNITTEST(TestAssertEqual);
|
||||
|
||||
void TestAssertLEqual()
|
||||
{
|
||||
ASSERT_LEQUAL(0, 1);
|
||||
ASSERT_LEQUAL(0, 0);
|
||||
}
|
||||
DECLARE_UNITTEST(TestAssertLEqual);
|
||||
|
||||
void TestAssertGEqual()
|
||||
{
|
||||
ASSERT_GEQUAL(1, 0);
|
||||
ASSERT_GEQUAL(0, 0);
|
||||
}
|
||||
DECLARE_UNITTEST(TestAssertGEqual);
|
||||
|
||||
void TestAssertLess()
|
||||
{
|
||||
ASSERT_LESS(0, 1);
|
||||
}
|
||||
DECLARE_UNITTEST(TestAssertLess);
|
||||
|
||||
void TestAssertGreater()
|
||||
{
|
||||
ASSERT_GREATER(1, 0);
|
||||
}
|
||||
DECLARE_UNITTEST(TestAssertGreater);
|
||||
|
||||
void TestTypeName()
|
||||
{
|
||||
ASSERT_EQUAL(unittest::type_name<char>(), "char");
|
||||
ASSERT_EQUAL(unittest::type_name<signed char>(), "signed char");
|
||||
ASSERT_EQUAL(unittest::type_name<unsigned char>(), "unsigned char");
|
||||
ASSERT_EQUAL(unittest::type_name<int>(), "int");
|
||||
ASSERT_EQUAL(unittest::type_name<float>(), "float");
|
||||
ASSERT_EQUAL(unittest::type_name<double>(), "double");
|
||||
}
|
||||
DECLARE_UNITTEST(TestTypeName);
|
||||
Reference in New Issue
Block a user