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
51 lines
1.9 KiB
C
51 lines
1.9 KiB
C
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of CUDA Experimental in CUDA Core Compute 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) 2026 NVIDIA CORPORATION & AFFILIATES.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#pragma once
|
|
// NOLINTBEGIN(modernize-use-using)
|
|
|
|
#ifndef CCCL_C_EXPERIMENTAL
|
|
# error "C exposure is experimental and subject to change. Define CCCL_C_EXPERIMENTAL to acknowledge this notice."
|
|
#endif // !CCCL_C_EXPERIMENTAL
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#include <cccl/c/extern_c.h>
|
|
#include <cccl/c/types.h>
|
|
|
|
CCCL_C_EXTERN_C_BEGIN
|
|
|
|
// Algorithm tag stored in the blob header. Used to detect cross-algorithm
|
|
// deserialization attempts (e.g. loading a reduce blob with scan_deserialize).
|
|
typedef enum cccl_serialization_algo_t
|
|
{
|
|
CCCL_SERIALIZATION_ALGO_REDUCE = 1,
|
|
CCCL_SERIALIZATION_ALGO_SCAN = 2,
|
|
CCCL_SERIALIZATION_ALGO_SEGMENTED_REDUCE = 3,
|
|
CCCL_SERIALIZATION_ALGO_TRANSFORM = 4,
|
|
CCCL_SERIALIZATION_ALGO_BINARY_SEARCH = 5,
|
|
CCCL_SERIALIZATION_ALGO_MERGE_SORT = 6,
|
|
CCCL_SERIALIZATION_ALGO_RADIX_SORT = 7,
|
|
CCCL_SERIALIZATION_ALGO_SEGMENTED_SORT = 8,
|
|
CCCL_SERIALIZATION_ALGO_THREE_WAY_PARTITION = 9,
|
|
CCCL_SERIALIZATION_ALGO_UNIQUE_BY_KEY = 10,
|
|
CCCL_SERIALIZATION_ALGO_HISTOGRAM = 11,
|
|
CCCL_SERIALIZATION_ALGO_FOR = 12,
|
|
} cccl_serialization_algo_t;
|
|
|
|
// Frees a buffer returned by any cccl_device_<algo>_serialize call.
|
|
// Required because allocations cross the cccl.c.parallel shared-library
|
|
// boundary; callers must not free returned buffers themselves.
|
|
CCCL_C_API void cccl_serialization_buffer_free(void* buf);
|
|
|
|
CCCL_C_EXTERN_C_END
|
|
// NOLINTEND(modernize-use-using)
|