libfaster API Documentation
Development Version
Super fast distributted computing
|
#include <fastContext.h>
Framework context class.
The context manages communication, scheduler and start Workers. A context is needed to create datasets!
Definition at line 66 of file fastContext.h.
Public Member Functions | |
fastContext (int argc=0, char **argv=NULL) | |
fastContext default constructor More... | |
fastContext (const fastSettings &s, int argc, char **argv) | |
fastContext constructor with custom settings | |
~fastContext () | |
fastContext destructor | |
void | startWorkers () |
Start worker machines computation. More... | |
bool | isDriver () |
Checks for the driver process. More... | |
int | numProcs () |
Return the number of processes running. More... | |
void | calibrate () |
Performs a microbenchmark to do dynamic load balancing (UNUSED) | |
Function and global variables registration | |
void | registerFunction (void *funcP) |
Register a user custom function in the context. More... | |
void | registerFunction (void *funcP, const std::string name) |
Register a user custom function in the context. More... | |
template<class T > | |
void | registerGlobal (T *varP) |
Gegisters a primitive global varible to be used inside used defined functions in distributted environment. More... | |
template<class T > | |
void | registerGlobal (T **varP, size_t s) |
Gegisters a global array to be used inside used defined functions in distributted environment. More... | |
template<class T > | |
void | registerGlobal (std::vector< T > *varP) |
Gegisters a global Vector to be used inside used defined functions in distributted environment. More... | |
Online file reading and parsing | |
template<typename T > | |
fdd< T > * | onlineFullPartRead (std::string path, onlineFullPartFuncP< T > funcP) |
Reads a file with online parsing and partition (NOT IMPLEMENTED) More... | |
template<typename K , typename T > | |
indexedFdd< K, T > * | onlineFullPartRead (std::string path, IonlineFullPartFuncP< K, T > funcP) |
template<typename K , typename T > | |
indexedFdd< K, T > * | onlinePartRead (std::string path, IonlineFullPartFuncP< K, T > funcP) |
template<typename T > | |
fdd< T > * | onlineRead (std::string path, onlineFullPartFuncP< T > funcP) |
Reads a file with online parsing and mapping (?) More... | |
template<typename K , typename T > | |
indexedFdd< K, T > * | onlineRead (std::string path, IonlineFullPartFuncP< K, T > funcP) |
Task execution profiling | |
void | printInfo () |
Prints task execution information for all tasks executed by the user. | |
void | printHeader () |
Prints a header for task execution information. More... | |
void | updateInfo () |
Prints information from tesk ran since last faster::fastContext::updateInfo() called. More... | |
faster::fastContext::fastContext | ( | int | argc = 0 , |
char ** | argv = NULL |
||
) |
fastContext default constructor
argc | - number of arguments from main |
argv | - arguments from main |
Definition at line 8 of file fastContext.cpp.
bool faster::fastContext::isDriver | ( | ) |
Checks for the driver process.
Definition at line 76 of file fastContext.cpp.
|
inline |
Return the number of processes running.
Definition at line 150 of file fastContext.h.
fdd<T>* faster::fastContext::onlineFullPartRead | ( | std::string | path, |
onlineFullPartFuncP< T > | funcP | ||
) |
Reads a file with online parsing and partition (NOT IMPLEMENTED)
T | - Dataset type |
path | - Input file path |
funcP | - partition function pointer of types ::faster::onlineFullPartFuncP or ::faster::IonlineFullPartFuncP |
fdd<T>* faster::fastContext::onlineRead | ( | std::string | path, |
onlineFullPartFuncP< T > | funcP | ||
) |
Reads a file with online parsing and mapping (?)
K | - Dataset key type |
T | - Dataset type |
path | - File path |
funcP | - (?) |
void faster::fastContext::printHeader | ( | ) |
Prints a header for task execution information.
To be used with faster::fastContext::updateInfo()
Definition at line 334 of file fastContext.cpp.
void faster::fastContext::registerFunction | ( | void * | funcP | ) |
Register a user custom function in the context.
Registering a user custom functions is necessary in order to pass it as parametes to FDD functions like map and reduce.
funcP | - Function pointer to a user defined function. |
Definition at line 48 of file fastContext.cpp.
void faster::fastContext::registerFunction | ( | void * | funcP, |
const std::string | name | ||
) |
Register a user custom function in the context.
Registering a user custom functions is necessary in order to pass it as parametes to FDD functions like map and reduce.
funcP | - Function pointer to a user defined function. |
name | - Custom name to registered funciton. |
Definition at line 53 of file fastContext.cpp.
void faster::fastContext::registerGlobal | ( | T * | varP | ) |
Gegisters a primitive global varible to be used inside used defined functions in distributted environment.
T | - Type of the global variable to be registered |
varP | - Global variable to be registered |
Definition at line 353 of file fastContext.h.
void faster::fastContext::registerGlobal | ( | T ** | varP, |
size_t | s | ||
) |
Gegisters a global array to be used inside used defined functions in distributted environment.
T | - Type of the global array to be registered |
varP | - Global array to be registered |
s | - Size of the array |
Definition at line 357 of file fastContext.h.
void faster::fastContext::registerGlobal | ( | std::vector< T > * | varP | ) |
Gegisters a global Vector to be used inside used defined functions in distributted environment.
T | - Type of the global vector to be registered |
varP | - Global vector to be registered |
Definition at line 362 of file fastContext.h.
void faster::fastContext::startWorkers | ( | ) |
Start worker machines computation.
When this function is called, the driver processes and works processes diverge from execution. While the Driver process starts to execute user code, the worker processes start to waiting for tasks. Then workers should exit short after this function is called.
Definition at line 58 of file fastContext.cpp.
void faster::fastContext::updateInfo | ( | ) |
Prints information from tesk ran since last faster::fastContext::updateInfo() called.
To be used with faster::fastContext::printHeader()
Definition at line 331 of file fastContext.cpp.