My Project
programmer's documentation
Functions
cs_sort_partition.c File Reference
#include "cs_defs.h"
#include <assert.h>
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "bft_mem.h"
#include "bft_printf.h"
#include "cs_sort_partition.h"
Include dependency graph for cs_sort_partition.c:

Functions

void cs_sort_partition_dest_rank_id (cs_lnum_t sampling_factor, size_t elt_size, cs_lnum_t n_elts, const void *elts, const cs_lnum_t *weight, const cs_lnum_t order[], int dest_rank_id[], cs_sort_partition_s_to_elt_t s_to_elt, cs_sort_partition_compare_t compare, const void *f_input, MPI_Comm comm)
 Determine to which rank data elements should be sent for parallel sorting or ordering. More...
 

Function Documentation

◆ cs_sort_partition_dest_rank_id()

void cs_sort_partition_dest_rank_id ( cs_lnum_t  sampling_factor,
size_t  elt_size,
cs_lnum_t  n_elts,
const void *  elts,
const cs_lnum_t weight,
const cs_lnum_t  order[],
int  dest_rank_id[],
cs_sort_partition_s_to_elt_t  s_to_elt,
cs_sort_partition_compare_t  compare,
const void *  f_input,
MPI_Comm  comm 
)

Determine to which rank data elements should be sent for parallel sorting or ordering.

Parameters
[in]sampling_factornumber of samples per rank
[in]elt_sizesize associated with each element
[in]n_eltsnumber of elements to be indexed
[in]eltsarray of elements
[in]weightoptional weight of each element, or NULL
[in]orderordering array
[out]dest_rank_iddestination rank id (size: n_elts)
[in]s_to_eltcoordinate to element conversion function
[in]comparecomparison function
[in]f_inputoptional input to s_to_elt and compare, or NULL
[in]commMPI communicator on which we build the global index