 |
Shiokaze Framework
A research-oriented fluid solver for computer graphics
|
|
Go to the documentation of this file.
25 #ifndef SHKZ_ARRAY_CORE2_H
26 #define SHKZ_ARRAY_CORE2_H
55 virtual
void initialize(
unsigned nx,
unsigned ny,
unsigned element_size ) = 0;
66 virtual
void get(
unsigned &nx,
unsigned &ny,
unsigned &element_size ) const = 0;
97 virtual
void set(
int i,
int j, std::function<
void(
void *value_ptr,
bool &active)> func ) = 0;
110 virtual const
void * operator()(
int i,
int j,
bool &filled ) const = 0;
119 virtual
void parallel_actives ( std::function<
void(
int i,
int j,
void *value_ptr,
bool &active, const
bool &filled,
int thread_index )> func, const
parallel_driver ¶llel ) = 0;
126 virtual
void serial_actives ( std::function<
bool(
int i,
int j,
void *value_ptr,
bool &active, const
bool &filled )> func ) = 0;
135 virtual
void const_parallel_actives ( std::function<
void(
int i,
int j, const
void *value_ptr, const
bool &filled,
int thread_index )> func, const
parallel_driver ¶llel ) const = 0;
142 virtual
void const_serial_actives ( std::function<
bool(
int i,
int j, const
void *value_ptr, const
bool &filled )> func ) const = 0;
151 virtual
void parallel_all ( std::function<
void(
int i,
int j,
void *value_ptr,
bool &active, const
bool &filled,
int thread_index )> func, const
parallel_driver ¶llel ) = 0;
160 virtual
void serial_all ( std::function<
bool(
int i,
int j,
void *value_ptr,
bool &active, const
bool &filled )> func ) = 0;
169 virtual
void const_parallel_all ( std::function<
void(
int i,
int j, const
void *value_ptr, const
bool &active, const
bool &filled,
int thread_index )> func, const
parallel_driver ¶llel ) const = 0;
176 virtual
void const_serial_all ( std::function<
bool(
int i,
int j, const
void *value_ptr, const
bool &active, const
bool &filled )> func ) const = 0;
185 virtual
void dilate( std::function<
void(
int i,
int j,
void *value_ptr,
bool &active, const
bool &filled,
int thread_index)> func, const
parallel_driver ¶llel ) = 0;
203 virtual
void const_parallel_inside ( std::function<
void(
int i,
int j, const
void *value_ptr, const
bool &active,
int thread_index )> func, const
parallel_driver ¶llel ) const = 0;
210 virtual
void const_serial_inside ( std::function<
bool(
int i,
int j, const
void *value_ptr, const
bool &active )> func ) const = 0;
virtual size_t count(const parallel_driver ¶llel) const =0
Count the number of active cells.
Class that facilitates the use of parallel_core class for parallel loop.
Definition: parallel_driver.h:44
virtual void set(int i, int j, std::function< void(void *value_ptr, bool &active)> func)=0
Set a value of a cell.
virtual void const_serial_all(std::function< bool(int i, int j, const void *value_ptr, const bool &active, const bool &filled)> func) const =0
Loop over all the cells in serial order by read-only fashion.
virtual void parallel_actives(std::function< void(int i, int j, void *value_ptr, bool &active, const bool &filled, int thread_index)> func, const parallel_driver ¶llel)=0
Loop over all the active cells in parallel.
virtual void copy(const array_core2 &array, std::function< void(void *target, const void *src)> copy_func, const parallel_driver ¶llel)=0
Copy grid.
#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
virtual void const_parallel_actives(std::function< void(int i, int j, const void *value_ptr, const bool &filled, int thread_index)> func, const parallel_driver ¶llel) const =0
Loop over all the active cells in parallel by read-only fashion.
virtual void get(unsigned &nx, unsigned &ny, unsigned &element_size) const =0
Get grid information.
Core module class for two dimensional array designed to be used in array2 class.
Definition: array_core2.h:38
virtual void serial_all(std::function< bool(int i, int j, void *value_ptr, bool &active, const bool &filled)> func)=0
Loop over all the cells in serial order.
virtual void const_serial_inside(std::function< bool(int i, int j, const void *value_ptr, const bool &active)> func) const =0
Loop over all the filled cells in serial order by read-only fashion.
virtual void initialize(unsigned nx, unsigned ny, unsigned element_size)=0
Allocate grid memory with value.
virtual void const_parallel_inside(std::function< void(int i, int j, const void *value_ptr, const bool &active, int thread_index)> func, const parallel_driver ¶llel) const =0
Loop over all the filled cells in parallel by read-only fashion.
virtual void serial_actives(std::function< bool(int i, int j, void *value_ptr, bool &active, const bool &filled)> func)=0
Loop over all the active cells in serial order.
virtual void const_serial_actives(std::function< bool(int i, int j, const void *value_ptr, const bool &filled)> func) const =0
Loop over all the active cells in serial order by read-only fashion.
virtual void const_parallel_all(std::function< void(int i, int j, const void *value_ptr, const bool &active, const bool &filled, int thread_index)> func, const parallel_driver ¶llel) const =0
Loop over all the cells in parallel by read-only fashion.
#define SHKZ_END_NAMESPACE
Name space end definition for shiokaze.
Definition: common.h:44
virtual void flood_fill(std::function< bool(void *value_ptr)> inside_func, const parallel_driver ¶llel)=0
Perform flood fill.
recursive_configurable class that also inherits module.
Definition: recursive_configurable_module.h:49
virtual void dilate(std::function< void(int i, int j, void *value_ptr, bool &active, const bool &filled, int thread_index)> func, const parallel_driver ¶llel)=0
Dilate cells.
virtual void parallel_all(std::function< void(int i, int j, void *value_ptr, bool &active, const bool &filled, int thread_index)> func, const parallel_driver ¶llel)=0
Loop over all the cells in parallel.