1 #ifndef teca_algorithm_executive_h
2 #define teca_algorithm_executive_h
4 #include "teca_config.h"
5 #include "teca_metadata.h"
16 #define TECA_ALGORITHM_EXECUTIVE_STATIC_NEW(T) \
22 return p_##T(new T); \
25 std::shared_ptr<T> shared_from_this() \
27 return std::static_pointer_cast<T>( \
28 teca_algorithm_executive::shared_from_this()); \
31 std::shared_ptr<T const> shared_from_this() const \
33 return std::static_pointer_cast<T const>( \
34 teca_algorithm_executive::shared_from_this()); \
54 :
public std::enable_shared_from_this<teca_algorithm_executive>
57 static p_teca_algorithm_executive
New()
65 virtual int initialize(MPI_Comm comm,
const teca_metadata &md);
72 void set_verbose(
int a_verbose) { this->verbose = a_verbose; }
73 int get_verbose()
const {
return this->verbose; }
Base class and default implementation for executives.
Definition: teca_algorithm_executive.h:55
p_teca_error_handler error_handler TECA_EXPORT
The global error handler instance.
auto New(size_t n_elem, teca_variant_array::allocator alloc=teca_variant_array::allocator::malloc)
Definition: teca_variant_array_util.h:269