#include "cs_defs.h"
#include <stdio.h>
 
Go to the source code of this file.
 | 
| 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...
  | 
|   | 
◆ cs_sort_partition_compare_t
      
        
          | typedef int() cs_sort_partition_compare_t(const void *elt1, const void *elt2, const void *input) | 
        
      
 
function pointer for comparison of 2 elements. 
This function is the same type as that used by qsort_r.
- Parameters
 - 
  
    | [in] | elt1 | coordinate between 0 and 1  | 
    | [in] | elt2 | pointer to optional (untyped) value or structure.  | 
    | [in] | input | pointer to optional (untyped) value or structure. | 
  
   
- Returns
 - < 0 if elt1 < elt2, 0 if elt1 == elt2, > 0 if elt1 > elt2 
 
 
 
◆ cs_sort_partition_s_to_elt_t
      
        
          | typedef void() cs_sort_partition_s_to_elt_t(double s, void *elt, const void *input) | 
        
      
 
function pointer for conversion of a double precision value in range [0, 1] to a given element. 
- Parameters
 - 
  
    | [in] | s | coordinate between 0 and 1  | 
    | [out] | elt | pointer to element  | 
    | [in] | input | pointer to optional (untyped) value or structure.  | 
  
   
 
 
◆ 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_factor | number of samples per rank  | 
    | [in] | elt_size | size associated with each element  | 
    | [in] | n_elts | number of elements to be indexed  | 
    | [in] | elts | array of elements  | 
    | [in] | weight | optional weight of each element, or NULL  | 
    | [in] | order | ordering array  | 
    | [out] | dest_rank_id | destination rank id (size: n_elts)  | 
    | [in] | s_to_elt | coordinate to element conversion function  | 
    | [in] | compare | comparison function  | 
    | [in] | f_input | optional input to s_to_elt and compare, or NULL  | 
    | [in] | comm | MPI communicator on which we build the global index  |