data_chunk_source_factories.hpp
1 /*
2  * Copyright (c) 2021-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/io/datasource.hpp>
21 #include <cudf/scalar/scalar.hpp>
22 #include <cudf/utilities/export.hpp>
23 #include <cudf/utilities/span.hpp>
24 
25 #include <memory>
26 #include <string>
27 
28 namespace CUDF_EXPORT cudf {
29 namespace io::text {
30 
37 std::unique_ptr<data_chunk_source> make_source(datasource& data);
38 
46 std::unique_ptr<data_chunk_source> make_source(host_span<char const> data);
47 
54 std::unique_ptr<data_chunk_source> make_source_from_file(std::string_view filename);
55 
63 std::unique_ptr<data_chunk_source> make_source_from_bgzip_file(std::string_view filename);
64 
77 std::unique_ptr<data_chunk_source> make_source_from_bgzip_file(std::string_view filename,
78  uint64_t virtual_begin,
79  uint64_t virtual_end);
80 
87 std::unique_ptr<data_chunk_source> make_source(cudf::string_scalar& data);
88 
89 } // namespace io::text
90 } // namespace CUDF_EXPORT cudf
An owning class to represent a string in device memory.
Definition: scalar.hpp:429
cuDF interfaces
Definition: host_udf.hpp:39
Class definitions for cudf::scalar.
APIs for spans.