Functions | |
void | getArraySliceParams (const size_t &dimx, const size_t &nbworkers, const size_t &idx_wk, size_t &startx_sub, size_t &nx_sub) |
Returns the parameters for splitting an array in several, balanced sub-arrays. This is mostly usefull for parallel calculations, where an array will be split and sent to different workers. More... | |
void | getArraySliceParamsOptim (const size_t &nbworkers, const std::vector< SnowStation *> &snow_station, const mio::DEMObject &dem, const mio::Grid2DObject &landuse, std::vector< std::vector< size_t > > &omp_snow_stations_ind) |
void OMPControl::getArraySliceParams | ( | const size_t & | dimx, |
const size_t & | nbworkers, | ||
const size_t & | idx_wk, | ||
size_t & | startx_sub, | ||
size_t & | nx_sub | ||
) |
Returns the parameters for splitting an array in several, balanced sub-arrays. This is mostly usefull for parallel calculations, where an array will be split and sent to different workers.
[in] | dimx | number of cells in the desired dimension |
[in] | nbworkers | total number of slices |
[in] | idx_wk | current slice index (starting at 0) |
[out] | startx_sub | calculated start index for the current slice |
[out] | nx_sub | calculated number of cells (in the desired dimension) of the current slice |
void OMPControl::getArraySliceParamsOptim | ( | const size_t & | nbworkers, |
const std::vector< SnowStation *> & | snow_station, | ||
const mio::DEMObject & | dem, | ||
const mio::Grid2DObject & | landuse, | ||
std::vector< std::vector< size_t > > & | omp_snow_stations_ind | ||
) |