MCPcopy Create free account
hub / github.com/dmlc/dmlc-core / ThreadedParser

Method ThreadedParser

src/data/parser.h:73–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71class ThreadedParser : public ParserImpl<IndexType, DType> {
72 public:
73 explicit ThreadedParser(ParserImpl<IndexType, DType> *base)
74 : base_(base), tmp_(NULL) {
75 iter_.set_max_capacity(8);
76 iter_.Init([base](std::vector<RowBlockContainer<IndexType, DType> > **dptr) {
77 if (*dptr == NULL) {
78 *dptr = new std::vector<RowBlockContainer<IndexType, DType> >();
79 }
80 return base->ParseNext(*dptr);
81 }, [base]() {base->BeforeFirst();});
82 }
83 virtual ~ThreadedParser(void) {
84 // stop things before base is deleted
85 iter_.Destroy();

Callers

nothing calls this directly

Calls 4

set_max_capacityMethod · 0.80
InitMethod · 0.45
ParseNextMethod · 0.45
BeforeFirstMethod · 0.45

Tested by

no test coverage detected