codekingpro/portable-devtools
114k
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES.
3 * All rights reserved. SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4 *
5 * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6 * property and proprietary rights in and to this material, related
7 * documentation and any modifications thereto. Any use, reproduction,
8 * disclosure or distribution of this material and related documentation
9 * without an express license agreement from NVIDIA CORPORATION or
10 * its affiliates is strictly prohibited.
11*/
12
13#pragma once
14
15#include "nvcompManager.hpp"
16
17namespace nvcomp {
18
19/**
20 * @brief Construct an nvcompManagerBase instance from a given compressed buffer.
21 *
22 * @param[in] comp_buffer The HLIF compressed buffer from which we intend to create the manager.
23 * The buffer needs to be host accessible.
24 *
25 * @param[in] num_threads The number of threads to use.
26
27 * @return The constructed manager instance.
28 */
29NVCOMP_EXPORT
30std::shared_ptr<nvcompManagerBase> create_cpu_manager(
31 const uint8_t* comp_buffer,
32 unsigned int num_threads = 0);
33
34/**
35 * @brief Returns the compression format for a given HLIF compressed buffer.
36 *
37 * @param[in] comp_buffer The HLIF compressed buffer from which we intend to create the manager.
38 * The buffer needs to be host accessible.
39 *
40 * @return Compression format.
41 */
42NVCOMP_EXPORT
43nvcompFormatType_t get_cpu_compression_format(
44 const uint8_t* comp_buffer);
45
46} // namespace nvcomp
47 