21 namespace foreign_storage {
27 void read(int8_t*
const destination,
28 const size_t num_bytes,
29 const size_t offset = 0,
32 const int destination_device_id = -1)
override;
36 const size_t num_bytes,
37 const size_t offset = 0,
39 const int source_device_id = -1)
override;
41 void reserve(
size_t additional_num_bytes)
override;
45 const size_t num_bytes,
47 const int device_id = -1)
override;
60 std::make_unique<DataTypeToStringConverter<T>>(element_to_string);
71 virtual std::vector<std::string>
convert(
const int8_t* bytes,
72 const size_t num_bytes) = 0;
81 std::vector<std::string>
convert(
const int8_t* bytes,
82 const size_t num_bytes)
override {
83 CHECK(num_bytes %
sizeof(
T) == 0);
85 const auto elements =
reinterpret_cast<const T*
>(bytes);
87 strings.reserve(num_elements);
size_t pageCount() const override
std::unique_ptr< AbstractDataTypeToStringConverter > data_to_string_converter_
void append(int8_t *source, const size_t num_bytes, const Data_Namespace::MemoryLevel source_buffer_type=Data_Namespace::CPU_LEVEL, const int device_id=-1) override
int8_t * getMemoryPtr() override
size_t reservedSize() const override
std::vector< std::string > buffer_
void appendValue(const std::string &value)
std::vector< std::string > strings
An AbstractBuffer is a unit of data management for a data manager.
void reserveNumElements(size_t additional_num_elements)
TypedParquetDetectBuffer()
void write(int8_t *source, const size_t num_bytes, const size_t offset=0, const Data_Namespace::MemoryLevel source_buffer_type=Data_Namespace::CPU_LEVEL, const int source_device_id=-1) override
Data_Namespace::MemoryLevel getType() const override
void reserve(size_t additional_num_bytes) override
const size_t num_elements
virtual std::vector< std::string > convert(const int8_t *bytes, const size_t num_bytes)=0
const std::vector< std::string > & getStrings()
void read(int8_t *const destination, const size_t num_bytes, const size_t offset=0, const Data_Namespace::MemoryLevel destination_buffer_type=Data_Namespace::CPU_LEVEL, const int destination_device_id=-1) override
void setConverterType(std::function< std::string(const T &)> element_to_string)
size_t pageSize() const override
virtual ~AbstractDataTypeToStringConverter()=default
std::function< std::string(const T &)> element_to_string_