fml  0.1-0
Fused Matrix Library
fml Namespace Reference

Core namespace. More...

Namespaces

 copy
 Copiers.
 
 dimops
 Row/column operations.
 
 linalg
 Linear algebra functions.
 
 nvml
 NVIDIA Management Library (NVML) interface. Exceptions
Each function can throw a 'runtime_error' exception.
 
 stats
 Statistics kernels.
 

Classes

class  card
 GPU data and methods. More...
 
class  comm
 MPI communicator data and helpers. More...
 
class  cpumat
 Matrix class for data held on a single CPU. More...
 
class  cpuvec
 Vector class for data held on a single CPU. More...
 
class  gpumat
 Matrix class for data held on a single GPU. More...
 
class  gpuscalar
 
class  gpuvec
 Vector class for data held on a single GPU. More...
 
class  grid
 2-dimensional MPI process grid. More...
 
class  mpimat
 Matrix class for data distributed over MPI in the 2-d block cyclic format. More...
 
class  parmat
 
class  parmat_cpu
 
class  parmat_gpu
 
class  unimat
 Base matrix class. Not meant for direct use. Instead see cpumat, gpumat, and mpimat. More...
 
class  univec
 Base vector class. Not meant for direct use. Instead see cpuvec and gpuvec. More...
 

Typedefs

typedef std::shared_ptr< fml::cardcard_sp_t
 

Enumerations

enum  gridshape { PROC_GRID_SQUARE, PROC_GRID_WIDE, PROC_GRID_TALL }
 Supported process grid shapes for 2-dimensional BLACS grids. More...
 
enum  blacsops { BLACS_SUM, BLACS_MAX, BLACS_MIN }
 Supported operations in reduce/allreduce.
 

Functions

int get_device_count ()
 Return number of GPU devices.
 
card_sp_t new_card (int id=0)
 Initialize a new card. More...
 
int get_device_num (const comm &c)
 Returns the device number of the GPU to use with the calling MPI process. More...
 

Detailed Description

Core namespace.

Function Documentation

◆ get_device_num()

int fml::get_device_num ( const comm c)
inline

Returns the device number of the GPU to use with the calling MPI process.

Parameters
[in]cA communicator object.
Returns
The ordinal device number for the calling MPI process to use in, e.g. fml::new_card().

Exceptions
If there are more MPI ranks within any node than there are GPUS, the function will throw a 'runtime_error' exception.

◆ new_card()

card_sp_t fml::new_card ( int  id = 0)
inline

Initialize a new card.

Parameters
[in]idGPU id number.
Returns
Shared pointer to initialized card object.

Exceptions
If the GPU can not be initialized, or if the allocation of one of the handles fails, the method will throw a 'runtime_error' exception.