src/base/cs_block_dist.c File Reference

| programmer's documentation

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
cs_block_dist.c File Reference
`#include "cs_defs.h"`
`#include <assert.h>`
`#include <errno.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include "bft_mem.h"`
`#include "bft_error.h"`
`#include "cs_block_dist.h"`
Include dependency graph for cs_block_dist.c:

## Functions
cs_block_dist_info_t | cs_block_dist_compute_sizes (int rank_id, int n_ranks, int min_rank_step, cs_lnum_t min_block_size, cs_gnum_t n_g_ents)
| Compute block size and rank info for use with a block distribution. More...
cs_block_dist_info_t | cs_block_dist_compute_sizes_nr (int rank_id, int n_ranks, int n_block_ranks, cs_gnum_t n_g_ents)
| Compute block size and rank info for use with a block distribution for a new global number of entities with a given number of active ranks. More...

## Function Documentation

cs_block_dist_info_t cs_block_dist_compute_sizes | ( | int | rank_id,
|  | int | n_ranks,
|  | int | min_rank_step,
|  | cs_lnum_t | min_block_size,
|  | cs_gnum_t | n_g_ents
| ) |  |

Compute block size and rank info for use with a block distribution.

Parameters

  [in] | rank_id | id of local rank (ignored in serial mode)
  [in] | n_ranks | number of associated ranks
  [in] | min_rank_step | minimum rank step between blocks
  [in] | min_block_size | minimum number of entities per block
  [in] | n_g_ents | total number of associated entities

Returns
  block size and range info structure

cs_block_dist_info_t cs_block_dist_compute_sizes_nr | ( | int | rank_id,
|  | int | n_ranks,
|  | int | n_block_ranks,
|  | cs_gnum_t | n_g_ents
| ) |  |

Compute block size and rank info for use with a block distribution for a new global number of entities with a given number of active ranks.

Parameters

  [in] | rank_id | id of local rank (ignored in serial mode)
  [in] | n_ranks | number of associated ranks
  [in] | n_block_ranks | number of ranks associated with a block
  [in] | n_g_ents | total number of associated entities

Returns
  block size and range info structure