planc
Parallel Lowrank Approximation with Non-negativity Constraints
Functions
distutils.hpp File Reference
#include <mpi.h>
#include <string>
#include "common/distutils.h"
#include "common/utils.h"
#include "common/utils.hpp"

Go to the source code of this file.

Functions

void mpitic ()
 
void mpitic (int rank)
 
double mpitoc (int rank)
 
double mpitoc ()
 
void memusage (const int myrank, std::string event)
 Captures the memory usage of every mpi process. More...
 
int itersplit (int n, int p, int r)
 The dimension a particular rank holds out of the global dimension n across p processes. More...
 
int startidx (int n, int p, int r)
 Returns the start idx of the current rank r for a global dimension n across p processes. More...
 

Function Documentation

◆ itersplit()

int itersplit ( int  n,
int  p,
int  r 
)
inline

The dimension a particular rank holds out of the global dimension n across p processes.

Parameters
[in]nis the global size of the tensor on that dimension
[in]pis the number of splits of n. Typically number of processes on a particular mode
[in]ris the rank of the mpi process in that mode. fiber rank

Definition at line 78 of file distutils.hpp.

◆ memusage()

void memusage ( const int  myrank,
std::string  event 
)
inline

Captures the memory usage of every mpi process.

Definition at line 49 of file distutils.hpp.

◆ mpitic() [1/2]

void mpitic ( )
inline

Definition at line 11 of file distutils.hpp.

◆ mpitic() [2/2]

void mpitic ( int  rank)
inline

Definition at line 16 of file distutils.hpp.

◆ mpitoc() [1/2]

double mpitoc ( int  rank)
inline

Definition at line 22 of file distutils.hpp.

◆ mpitoc() [2/2]

double mpitoc ( )
inline

Definition at line 35 of file distutils.hpp.

◆ startidx()

int startidx ( int  n,
int  p,
int  r 
)
inline

Returns the start idx of the current rank r for a global dimension n across p processes.

Parameters
[in]nis the size of the tensor on that dimension
[in]pis the number of splits of n.
[in]ris the rank of the mpi process in that mode. fiber rank

Definition at line 90 of file distutils.hpp.