1 #ifndef teca_programmable_reduce_h
2 #define teca_programmable_reduce_h
4 #include "teca_programmable_reduce_fwd.h"
5 #include "teca_programmable_algorithm_fwd.h"
6 #include "teca_index_reduce.h"
7 #include "teca_dataset_fwd.h"
8 #include "teca_metadata.h"
30 int set_name(
const std::string &name);
32 const char *get_class_name()
const override
33 {
return this->class_name; }
43 TECA_ALGORITHM_CALLBACK_PROPERTY(report_callback_t, report_callback)
53 TECA_ALGORITHM_CALLBACK_PROPERTY(request_callback_t, request_callback)
63 TECA_ALGORITHM_CALLBACK_PROPERTY(reduce_callback_t, reduce_callback)
72 TECA_ALGORITHM_CALLBACK_PROPERTY(finalize_callback_t, finalize_callback)
78 p_teca_dataset reduce(
const const_p_teca_dataset &left,
79 const const_p_teca_dataset &right)
override;
81 p_teca_dataset finalize(
const const_p_teca_dataset &input)
override;
83 std::vector<teca_metadata> initialize_upstream_request(
84 unsigned int port,
const std::vector<teca_metadata> &input_md,
88 const std::vector<teca_metadata> &input_md)
override;
91 reduce_callback_t reduce_callback;
92 finalize_callback_t finalize_callback;
93 request_callback_t request_callback;
94 report_callback_t report_callback;