nvcomp_adapter.hpp
1 /*
2  * Copyright (c) 2024, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <cudf/utilities/export.hpp>
20 
21 #include <optional>
22 #include <string>
23 
24 namespace CUDF_EXPORT cudf {
25 namespace io::detail::nvcomp {
26 
27 enum class compression_type { SNAPPY, ZSTD, DEFLATE, LZ4, GZIP };
28 
39 
45 
52  feature_status_parameters(bool all_enabled, bool stable_enabled);
53 };
54 
58 inline bool operator==(feature_status_parameters const& lhs, feature_status_parameters const& rhs)
59 {
60  return lhs.lib_major_version == rhs.lib_major_version and
65 }
66 
76 [[nodiscard]] std::optional<std::string> is_compression_disabled(
77  compression_type compression, feature_status_parameters params = feature_status_parameters());
78 
88 [[nodiscard]] std::optional<std::string> is_decompression_disabled(
89  compression_type compression, feature_status_parameters params = feature_status_parameters());
90 
91 } // namespace io::detail::nvcomp
92 } // namespace CUDF_EXPORT cudf
bool operator==(polymorphic_allocator< T > const &lhs, polymorphic_allocator< U > const &rhs)
compression_type
Compression algorithms.
Definition: io/types.hpp:57
cuDF interfaces
Definition: host_udf.hpp:39
Set of parameters that impact whether nvCOMP features are enabled.
feature_status_parameters()
Default constructor using the current version of nvcomp and current environment variables.
feature_status_parameters(bool all_enabled, bool stable_enabled)
Constructor using the current version of nvcomp.