HMLP: High-performance Machine Learning Primitives
hmlp::mpigofmm::randomsplit< SPDMATRIX, N_SPLIT, T > Struct Template Reference

#include <gofmm_mpi.hpp>

Inheritance diagram for hmlp::mpigofmm::randomsplit< SPDMATRIX, N_SPLIT, T >:
hmlp::gofmm::randomsplit< SPDMATRIX, N_SPLIT, T >

Public Member Functions

 randomsplit (SPDMATRIX &K)
 
vector< vector< size_t > > operator() (vector< size_t > &gids) const
 
vector< vector< size_t > > operator() (vector< size_t > &gids, mpi::Comm comm) const
 
- Public Member Functions inherited from hmlp::gofmm::randomsplit< SPDMATRIX, N_SPLIT, T >
 randomsplit (SPDMATRIX &K)
 
vector< vector< size_t > > operator() (vector< size_t > &gids) const
 

Additional Inherited Members

- Public Attributes inherited from hmlp::gofmm::randomsplit< SPDMATRIX, N_SPLIT, T >
SPDMATRIX * Kptr = NULL
 
DistanceMetric metric = ANGLE_DISTANCE
 

Detailed Description

template<typename SPDMATRIX, int N_SPLIT, typename T>
struct hmlp::mpigofmm::randomsplit< SPDMATRIX, N_SPLIT, T >

end struct centersplit

Member Function Documentation

template<typename SPDMATRIX , int N_SPLIT, typename T >
vector<vector<size_t> > hmlp::mpigofmm::randomsplit< SPDMATRIX, N_SPLIT, T >::operator() ( vector< size_t > &  gids) const
inline

Shared-memory operator.

template<typename SPDMATRIX , int N_SPLIT, typename T >
vector<vector<size_t> > hmlp::mpigofmm::randomsplit< SPDMATRIX, N_SPLIT, T >::operator() ( vector< size_t > &  gids,
mpi::Comm  comm 
) const
inline

Distributed operator.

All assertions

Declaration

Reduce to get the total size of gids.

n = sum( num_points_owned ) over all MPI processes in comm

Early return

Randomly select two points p and q

Create a pair <gids.size(), rank> for MPI Allreduce

max_pair = max( local_max_pairs ) over all MPI processes in comm

Bcast gidf2c from the rank that has the most gids

Choose the second MPI rank

max_pair = max( local_max_pairs ) over all MPI processes in comm

Bcast gidf2c from the rank that has the most gids

We use relative distances (dip - diq) for clustering.

Split gids into two clusters using median split.

Perform P2P redistribution.


The documentation for this struct was generated from the following file: