Skip to content
Snippets Groups Projects
Commit 5ac293a3 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel: Committed by Sergey Kosukhin
Browse files

Replace interface not exactly matching the implementation.

* Unfortunately, C array parameters cannot have the restrict attribute
  thus better document the array characteristic and let the compiler
  optimize with aliasing restrictions in place.
parent c89122de
No related branches found
No related tags found
No related merge requests found
......@@ -112,7 +112,21 @@ void printArray(const char *, const char *, const void *, int, int, const char *
*/
int cdiPioQueryVarDims(int varShape[3], int vlistID, int varID);
void cdiPioDeco1D_CCP(size_t n, const size_t weightPfxSums[n], size_t nparts, size_t separators[nparts + 1]);
/**
* Computes simple, balanced 1D decomposition of weighted elements e.
*
* @param n number of elements to balance
* @param[in] weightPfxSums points to array of the \a n+1 partial
* weight sums, where
* weightPfxSums[i]-weightPfxSums[i-1] =
* weight of \$e_{i-1}\$
* @param nparts number of parts to generate for partition
* @param[out] separators pointer to array of size nparts+1,
* initialized by this function such that
* part i consists of elements indexed as
* separators[i] to separators[i+1]-1
*/
void cdiPioDeco1D_CCP(size_t n, const size_t *restrict weightPfxSums, size_t nparts, size_t *restrict separators);
static inline size_t
cdiPioElemSizeInference(size_t varID, const int *conversion)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment