Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions
xgboost.data::SparsePageFormat< T > Class Template Referenceabstract

Format specification of various data formats like SparsePage. More...

#include <sparse_page_writer.h>

Inheritance diagram for xgboost.data::SparsePageFormat< T >:
xgboost.data::SparsePageRawFormat< T >

Public Member Functions

virtual bool Read (T *page, common::AlignedResourceReadStream *fi)=0
 Load all the segments into page, advance fi to end of the block.
 
virtual size_t Write (const T &page, common::AlignedFileWriteStream *fo)=0
 save the data to fo, when a page was written.
 

Detailed Description

template<typename T>
class xgboost.data::SparsePageFormat< T >

Format specification of various data formats like SparsePage.

Member Function Documentation

◆ Read()

template<typename T >
virtual bool xgboost.data::SparsePageFormat< T >::Read ( T *  page,
common::AlignedResourceReadStream fi 
)
pure virtual

Load all the segments into page, advance fi to end of the block.

Parameters
pageThe data to read page into.
fithe input stream of the file
Returns
true of the loading as successful, false if end of file was reached

Implemented in xgboost.data::GHistIndexRawFormat, and xgboost.data::SparsePageRawFormat< T >.

◆ Write()

template<typename T >
virtual size_t xgboost.data::SparsePageFormat< T >::Write ( const T &  page,
common::AlignedFileWriteStream fo 
)
pure virtual

save the data to fo, when a page was written.

Parameters
fooutput stream

Implemented in xgboost.data::SparsePageRawFormat< T >, and xgboost.data::GHistIndexRawFormat.


The documentation for this class was generated from the following file: