libcudf  24.04.00
data_chunk_source_factories.hpp
1 /*
2  * Copyright (c) 2021-2023, 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>
20 #include <cudf/io/text/data_chunk_source.hpp>
21 #include <cudf/scalar/scalar.hpp>
22 #include <cudf/utilities/span.hpp>
23 
24 #include <memory>
25 #include <string>
26 
27 namespace cudf::io::text {
28 
35 std::unique_ptr<data_chunk_source> make_source(datasource& data);
36 
44 std::unique_ptr<data_chunk_source> make_source(host_span<char const> data);
45 
52 std::unique_ptr<data_chunk_source> make_source_from_file(std::string_view filename);
53 
61 std::unique_ptr<data_chunk_source> make_source_from_bgzip_file(std::string_view filename);
62 
75 std::unique_ptr<data_chunk_source> make_source_from_bgzip_file(std::string_view filename,
76  uint64_t virtual_begin,
77  uint64_t virtual_end);
78 
85 std::unique_ptr<data_chunk_source> make_source(cudf::string_scalar& data);
86 
87 } // namespace cudf::io::text
An owning class to represent a string in device memory.
Definition: scalar.hpp:429
Class definitions for cudf::scalar.
APIs for spans.