 |
Shiokaze Framework
A research-oriented fluid solver for computer graphics
|
|
Go to the documentation of this file.
25 #ifndef SHKZ_ARRAY_CORE3_H
26 #define SHKZ_ARRAY_CORE3_H
57 virtual
void initialize(
unsigned nx,
unsigned ny,
unsigned nz,
unsigned element_size ) = 0;
70 virtual
void get(
unsigned &nx,
unsigned &ny,
unsigned &nz,
unsigned &element_size ) const = 0;
103 virtual
void set(
int i,
int j,
int k, std::function<
void(
void *value_ptr,
bool &active)> func ) = 0;
118 virtual const
void * operator()(
int i,
int j,
int k,
bool &filled ) const = 0;
127 virtual
void parallel_actives ( std::function<
void(
int i,
int j,
int k,
void *value_ptr,
bool &active, const
bool &filled,
int thread_index )> func, const
parallel_driver ¶llel ) = 0;
134 virtual
void serial_actives ( std::function<
bool(
int i,
int j,
int k,
void *value_ptr,
bool &active, const
bool &filled )> func ) = 0;
141 virtual
void const_parallel_actives ( std::function<
void(
int i,
int j,
int k, const
void *value_ptr, const
bool &filled,
int thread_index )> func, const
parallel_driver ¶llel ) const = 0;
148 virtual
void const_serial_actives ( std::function<
bool(
int i,
int j,
int k, const
void *value_ptr, const
bool &filled )> func ) const = 0;
157 virtual
void parallel_all ( std::function<
void(
int i,
int j,
int k,
void *value_ptr,
bool &active, const
bool &filled,
int thread_index )> func, const
parallel_driver ¶llel ) = 0;
166 virtual
void serial_all ( std::function<
bool(
int i,
int j,
int k,
void *value_ptr,
bool &active, const
bool &filled )> func ) = 0;
175 virtual
void const_parallel_all ( std::function<
void(
int i,
int j,
int k, const
void *value_ptr, const
bool &active, const
bool &filled,
int thread_index )> func, const
parallel_driver ¶llel ) const = 0;
184 virtual
void const_serial_all ( std::function<
bool(
int i,
int j,
int k, const
void *value_ptr, const
bool &active, const
bool &filled )> func ) const = 0;
193 virtual
void dilate( std::function<
void(
int i,
int j,
int k,
void *value_ptr,
bool &active, const
bool &filled,
int thread_index)> func, const
parallel_driver ¶llel ) = 0;
211 virtual
void const_parallel_inside ( std::function<
void(
int i,
int j,
int k, const
void *value_ptr, const
bool &active,
int thread_index )> func, const
parallel_driver ¶llel ) const = 0;
218 virtual
void const_serial_inside ( std::function<
bool(
int i,
int j,
int k, const
void *value_ptr, const
bool &active)> func ) const = 0;
virtual void set(int i, int j, int k, 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, int k, 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_all(std::function< void(int i, int j, int k, void *value_ptr, bool &active, const bool &filled, int thread_index)> func, const parallel_driver ¶llel)=0
Loop over all the cells in parallel.
Class that facilitates the use of parallel_core class for parallel loop.
Definition: parallel_driver.h:44
virtual void const_parallel_all(std::function< void(int i, int j, int k, 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.
Core module class for three dimensional array designed to be used in array3 class.
Definition: array_core3.h:38
virtual void serial_actives(std::function< bool(int i, int j, int k, void *value_ptr, bool &active, const bool &filled)> func)=0
Loop over all the active cells in serial order.
virtual void const_parallel_inside(std::function< void(int i, int j, int k, 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 get(unsigned &nx, unsigned &ny, unsigned &nz, unsigned &element_size) const =0
Get grid information.
virtual void initialize(unsigned nx, unsigned ny, unsigned nz, unsigned element_size)=0
Allocate grid memory with value.
virtual void flood_fill(std::function< bool(void *value_ptr)> inside_func, const parallel_driver ¶llel)=0
Perform flood fill.
virtual size_t count(const parallel_driver ¶llel) const =0
Count the number of active cells.
#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 copy(const array_core3 &array, std::function< void(void *target, const void *src)> copy_func, const parallel_driver ¶llel)=0
Copy grid.
virtual void const_serial_inside(std::function< bool(int i, int j, int k, 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 const_serial_actives(std::function< bool(int i, int j, int k, 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 serial_all(std::function< bool(int i, int j, int k, void *value_ptr, bool &active, const bool &filled)> func)=0
Loop over all the cells in serial order.
virtual void dilate(std::function< void(int i, int j, int k, void *value_ptr, bool &active, const bool &filled, int thread_index)> func, const parallel_driver ¶llel)=0
Dilate cells.
virtual void const_parallel_actives(std::function< void(int i, int j, int k, 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 parallel_actives(std::function< void(int i, int j, int k, 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.
#define SHKZ_END_NAMESPACE
Name space end definition for shiokaze.
Definition: common.h:44
recursive_configurable class that also inherits module.
Definition: recursive_configurable_module.h:49