1 #ifndef teca_threaded_programmable_algorithm_h
2 #define teca_threaded_programmable_algorithm_h
4 #include "teca_metadata.h"
5 #include "teca_threaded_algorithm.h"
6 #include "teca_dataset_fwd.h"
8 #include "teca_programmable_algorithm_fwd.h"
74 virtual int set_name(
const std::string &name);
76 const char *get_class_name()
const override
77 {
return this->class_name; }
80 using teca_algorithm::set_number_of_input_connections;
81 using teca_algorithm::set_number_of_output_ports;
84 using teca_threaded_algorithm::set_thread_pool_size;
89 using teca_threaded_algorithm::set_stream_size;
92 void use_default_report_action();
93 void use_default_request_action();
94 void use_default_execute_action();
104 TECA_ALGORITHM_CALLBACK_PROPERTY(
105 report_callback_t, report_callback)
117 TECA_ALGORITHM_CALLBACK_PROPERTY(
118 request_callback_t, request_callback)
129 TECA_ALGORITHM_CALLBACK_PROPERTY(
130 threaded_execute_callback_t, execute_callback)
137 const std::vector<teca_metadata> &input_md)
override;
139 std::vector<teca_metadata> get_upstream_request(
141 const std::vector<teca_metadata> &input_md,
144 const_p_teca_dataset execute(
unsigned int port,
145 const std::vector<const_p_teca_dataset> &input_data,
149 report_callback_t report_callback;
150 request_callback_t request_callback;
151 threaded_execute_callback_t execute_callback;