1 #ifndef teca_threaded_programmable_algorithm_h
2 #define teca_threaded_programmable_algorithm_h
4 #include "teca_config.h"
5 #include "teca_metadata.h"
6 #include "teca_dataset.h"
7 #include "teca_threaded_algorithm.h"
8 #include "teca_programmable_algorithm.h"
74 virtual int set_name(
const std::string &name);
77 {
return this->class_name; }
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 using teca_threaded_algorithm::execute;
140 const std::vector<teca_metadata> &input_md)
override;
144 const std::vector<teca_metadata> &input_md,
147 const_p_teca_dataset execute(
unsigned int port,
148 const std::vector<const_p_teca_dataset> &input_data,
152 report_callback_t report_callback;
153 request_callback_t request_callback;
154 threaded_execute_callback_t execute_callback;
virtual std::vector< teca_metadata > get_upstream_request(unsigned int port, const std::vector< teca_metadata > &input_md, const teca_metadata &request)
void set_number_of_output_ports(unsigned int n)
virtual teca_metadata get_output_metadata(unsigned int port, const std::vector< teca_metadata > &input_md)
void set_number_of_input_connections(unsigned int n)
This is the base class defining a threaded algorithm.
Definition: teca_threaded_algorithm.h:71
void set_stream_size(const int &v)
Definition: teca_threaded_algorithm.h:106
void set_thread_pool_size(int n_threads)
An threaded algorithm implemented with user provided callbacks.
Definition: teca_threaded_programmable_algorithm.h:67
const char * get_class_name() const override
Definition: teca_threaded_programmable_algorithm.h:76
p_teca_error_handler error_handler TECA_EXPORT
The global error handler instance.