codekingpro/portable-devtools
114k
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2017-2025 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#ifdef __has_include
16#if __has_include(<cuda_runtime.h>)
17 #include <cuda_runtime.h>
18#else
19 #ifndef __device__
20 #define __device__
21 #endif
22 #ifndef __host__
23 #define __host__
24 #endif
25#endif
26#endif
27
28#include "nvcomp/shared_types.h"
29#include "nvcomp/version.h"
30#include "nvcomp_export.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/**
37 * @brief Retrieve the nvCOMP library properties.
38 *
39 * @param[out] properties Retrieved nvCOMP properties in an nvcompProperties_t struct.
40 *
41 * @return nvcompErrorInvalidValue if properties is nullptr, nvcompSuccess otherwise.
42 */
43NVCOMP_EXPORT
44nvcompStatus_t nvcompGetProperties(nvcompProperties_t* properties);
45
46/**
47 * @brief Returns the description string for an error code.
48 *
49 * @param nvcompStatus_t Status to convert to string
50 *
51 * @return Pointer to a NULL-terminated string.
52 */
53NVCOMP_EXPORT
54const char* nvcompGetStatusString(nvcompStatus_t status);
55
56#ifdef __cplusplus
57}
58#endif
59 