 |
Shiokaze Framework
A research-oriented fluid solver for computer graphics
|
|
Go to the documentation of this file.
25 #ifndef SHKZ_LOOP_SPLITTER_H
26 #define SHKZ_LOOP_SPLITTER_H
48 virtual const
void*
new_context (
size_t size,
int num_threads ) const = 0;
57 virtual std::function<
size_t(const
void *context,
int thread_index)>
get_start_func( const
void *context ) const = 0;
66 virtual std::function<
bool(const
void *context,
size_t &n,
int thread_index)>
get_advance_func( const
void *context ) const = 0;
virtual void delete_context(const void *context) const =0
Deallocate the context generated by new_context.
#define DEFINE_MODULE(CLASS_T, LNG_NAME, ARG_NAME, DESCRIPTION)
Definition that simplifies the loading module.
Definition: recursive_configurable_module.h:39
#define SHKZ_BEGIN_NAMESPACE
Name space beggining definition for shiokaze.
Definition: common.h:39
Abstract class that handles how to distribute loop enumeration for parallel processings....
Definition: loop_splitter.h:36
#define SHKZ_END_NAMESPACE
Name space end definition for shiokaze.
Definition: common.h:44
virtual std::function< size_t(const void *context, int thread_index)> get_start_func(const void *context) const =0
Get a function that provides us the starting index of a loop for the specific thread.
virtual std::function< bool(const void *context, size_t &n, int thread_index)> get_advance_func(const void *context) const =0
Get a function that advances an index of a loop.
virtual const void * new_context(size_t size, int num_threads) const =0
Allocate a new context for a loop.
recursive_configurable class that also inherits module.
Definition: recursive_configurable_module.h:49