byte_range_info.hpp
前往此文件的文档。
1 /*
2  * 版权所有 (c) 2022-2024, NVIDIA CORPORATION.
3  *
4  * 根据 Apache 许可证 2.0 版(“许可证”)获得许可;
5  * 除非遵守许可证,否则不得使用此文件。
6  * 您可以在以下位置获取许可证的副本:
7  *
8  * https://apache.ac.cn/licenses/LICENSE-2.0
9  *
10  * 除非适用法律要求或书面同意,根据许可证分发的软件按“原样”分发,
11  * 不提供任何明示或暗示的保证或条件。
12  * 请参阅许可证了解具体的权限和限制。
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 <cstdint>
22 #include <vector>
23 
24 namespace CUDF_EXPORT cudf {
25 namespace io {
26 namespace text {
37  private
38  int64_t _offset{};
39  int64_t _size{};
40 
41  public
42  byte_range_info() = default;
49  byte_range_info(int64_t offset, int64_t size);
50 
56  byte_range_info(byte_range_info const& other) noexcept = default;
63  byte_range_info& operator=(byte_range_info const& other) noexcept = default;
64 
70  [[nodiscard]] int64_t offset() const { return _offset; }
77  [[nodiscard]] int64_t size() const { return _size; }
78 
84  [[nodiscard]] bool is_empty() const { return size() == 0; }
85 };
86 
97 std::vector<byte_range_info> create_byte_range_infos_consecutive(int64_t total_bytes,
98  int64_t range_count);
99 
107  // end of group
109 
110 } // namespace text
111 } // namespace io
112 } // namespace CUDF_EXPORT cudf
cudf::io::text::byte_range_info
获取字节大小。
cudf::io::text::byte_range_info::offset
获取字节偏移量。
cudf::io::text::byte_range_info::operator=
拷贝赋值运算符。
cudf::io::text::byte_range_info::byte_range_info
拷贝构造函数。
cudf::io::text::byte_range_info::is_empty
返回范围是否为空。
byte_range_info(int64_t offset, int64_t size)
构造一个 byte_range_info 对象。
cudf::io::text::create_byte_range_info_max
创建一个代表文件尽可能大范围的 byte_range_info 对象。具体来说,...
cudf::io::text::create_byte_range_infos_consecutive
创建 [0, total_bytes) 之间一系列连续的范围集合。
cuDF 接口
定义: host_udf.hpp:37
由 doxygen 1.9.1 生成