MCPcopy Create free account
hub / github.com/BlazingDB/blazingsql / process

Method process

engine/src/execution_kernels/kernel.cpp:76–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76ral::execution::task_result kernel::process(std::vector<std::unique_ptr<ral::frame::BlazingTable>> inputs,
77 std::shared_ptr<ral::cache::CacheMachine> output,
78 cudaStream_t stream,
79 const std::map<std::string, std::string>& args){
80
81 if(inputs.size()==0){
82 return {ral::execution::task_status::SUCCESS, std::string(), std::vector< std::unique_ptr<ral::frame::BlazingTable> > ()};
83 }
84
85 size_t bytes = 0;
86 size_t rows = 0;
87 for(auto & input : inputs){
88 bytes += input->sizeInBytes();
89 rows += input->num_rows();
90 }
91 auto result = do_process(std::move(inputs), output, stream, args);
92 if(result.status == ral::execution::SUCCESS){
93 // increment these AFTER its been processed successfully
94 total_input_bytes_processed += bytes;
95 total_input_rows_processed += rows;
96 } else {
97 auto logger = spdlog::get("batch_logger");
98 if (logger) {
99 logger->error("|||{info}|||||",
100 "info"_a="ERROR in kernel::process trying to do do_process. Kernel name is: " + this->kernel_name() + " Kernel id is: " + std::to_string(this->kernel_id));
101 }
102 }
103 return std::move(result);
104}
105
106void kernel::add_task(size_t task_id){
107 std::lock_guard<std::mutex> lock(kernel_mutex);

Callers

nothing calls this directly

Calls 4

kernel_nameMethod · 0.95
sizeMethod · 0.80
sizeInBytesMethod · 0.45
num_rowsMethod · 0.45

Tested by

no test coverage detected