//===----------------------------------------------------------------------===// // // 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. // //===----------------------------------------------------------------------===// #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 #include #include #include #include CCCL_C_EXTERN_C_BEGIN typedef struct cccl_device_histogram_build_result_t { int cc; void* payload; size_t payload_size; void* jit_compiler; void* histogram_fn; cccl_type_info counter_type; cccl_type_info level_type; cccl_type_info sample_type; int num_channels; int num_active_channels; } cccl_device_histogram_build_result_t; CCCL_C_API CUresult cccl_device_histogram_build( cccl_device_histogram_build_result_t* build, int num_channels, int num_active_channels, cccl_iterator_t d_samples, int num_output_levels_val, cccl_iterator_t d_output_histograms, cccl_type_info level_type, int64_t num_rows, int64_t row_stride_samples, bool is_evenly_segmented, int cc_major, int cc_minor, const char* cub_path, const char* thrust_path, const char* libcudacxx_path, const char* ctk_path); // Extended version with build configuration CCCL_C_API CUresult cccl_device_histogram_build_ex( cccl_device_histogram_build_result_t* build, int num_channels, int num_active_channels, cccl_iterator_t d_samples, int num_output_levels_val, cccl_iterator_t d_output_histograms, cccl_type_info level_type, int64_t num_rows, int64_t row_stride_samples, bool is_evenly_segmented, int cc_major, int cc_minor, const char* cub_path, const char* thrust_path, const char* libcudacxx_path, const char* ctk_path, cccl_build_config* config); CCCL_C_API CUresult cccl_device_histogram_even( cccl_device_histogram_build_result_t build, void* d_temp_storage, size_t* temp_storage_bytes, cccl_iterator_t d_samples, cccl_iterator_t d_output_histograms, cccl_value_t num_output_levels, cccl_value_t lower_level, cccl_value_t upper_level, int64_t num_row_pixels, int64_t num_rows, int64_t row_stride_samples, CUstream stream); CCCL_C_API CUresult cccl_device_histogram_cleanup(cccl_device_histogram_build_result_t* bld_ptr); CCCL_C_EXTERN_C_END // NOLINTEND(modernize-use-using)