PSFEstimationwithCPSO
Debug Class Reference

This static class is responsible for controlling all the debug information that is produced by the program. More...

#include <debug.hpp>

List of all members.

Static Public Member Functions

static void startup_locks ()
 Starts up all the locks for parallel execution.
static void destroy_locks ()
 Destroy all the locks used for parallel execution.
static void debug (const char *msg)
 Prinf a simple char message to the output stream.
template<class T >
static void debug (cl_command_queue command_queue, const char *label, cl_mem cl_ptr, int rows, int n_vars)
 Print an OpenCl matrix to the standard output.
template<class T >
static void debugHost (const char *label, void *ptr, int rows, int n_vars)
 Print a CPU matrix to the standard output.
static void debugComplex (cl_command_queue command_queue, const char *label, cl_mem cl_ptr, int rows, int n_vars)
 Print an OpenCl matrix of complex numbers (FFT_TYPE) to the standard output.
static void debugHostComplex (const char *label, FFT_TYPE *ptr, int rows, int n_vars)
 Print a CPU matrix of complex numbers (FFT_TYPE) to the standard output.
static void traceInfo (const char *msg)
 Prinf a simple char message as Trace information to the output stream.
static void traceError (const char *msg)
 Prinf a simple char message as Error information to the error stream.
template<class T >
static void checkSum (cl_command_queue command_queue, cl_mem cl_ptr, int size, double compareTo, const char *file, int line)
 Compare the OpenCl reduction result with a classical CPU sum.
static void checkSumComplex (cl_command_queue command_queue, cl_mem cl_ptr, int size, FFT_TYPE compareTo, const char *file, int line)
 Compare the OpenCl reduction result of complex numbers (FFT_TYPE) with a classical CPU sum.

Detailed Description

This static class is responsible for controlling all the debug information that is produced by the program.


Member Function Documentation

template<class T >
static void Debug::checkSum ( cl_command_queue  command_queue,
cl_mem  cl_ptr,
int  size,
double  compareTo,
const char *  file,
int  line 
) [inline, static]

Compare the OpenCl reduction result with a classical CPU sum.

Parameters:
command_queueThe command queue from where to read the OpenCl matrix.
cl_ptrThe OpenCl matrix.
sizeThe size of the matrix.
compareToThe OpenCl result to be compared with this classical sum.
fileThe source code file name where this method was called.
lineThe source code line where this method was called.
static void Debug::checkSumComplex ( cl_command_queue  command_queue,
cl_mem  cl_ptr,
int  size,
FFT_TYPE  compareTo,
const char *  file,
int  line 
) [inline, static]

Compare the OpenCl reduction result of complex numbers (FFT_TYPE) with a classical CPU sum.

Parameters:
command_queueThe command queue from where to read the OpenCl matrix.
cl_ptrThe OpenCl matrix.
sizeThe size of the matrix.
compareToThe OpenCl result to be compared with this classical sum.
fileThe source code file name where this method was called.
lineThe source code line where this method was called.
template<class T >
static void Debug::debug ( cl_command_queue  command_queue,
const char *  label,
cl_mem  cl_ptr,
int  rows,
int  n_vars 
) [inline, static]

Print an OpenCl matrix to the standard output.

Parameters:
command_queueThe command queue from where to read the OpenCl matrix.
labelThe output label to be printed.
cl_ptrThe OpenCl matrix.
rowsThe number of rows of the matrix.
n_varsThe number of columns of the matrix.
static void Debug::debug ( const char *  msg) [inline, static]

Prinf a simple char message to the output stream.

Parameters:
msgThe message.
static void Debug::debugComplex ( cl_command_queue  command_queue,
const char *  label,
cl_mem  cl_ptr,
int  rows,
int  n_vars 
) [inline, static]

Print an OpenCl matrix of complex numbers (FFT_TYPE) to the standard output.

Parameters:
command_queueThe command queue from where to read the OpenCl matrix.
labelThe output label to be printed.
cl_ptrThe OpenCl matrix.
rowsThe number of rows of the matrix.
n_varsThe number of columns of the matrix.
template<class T >
static void Debug::debugHost ( const char *  label,
void *  ptr,
int  rows,
int  n_vars 
) [inline, static]

Print a CPU matrix to the standard output.

Parameters:
labelThe output label to be printed.
ptrThe Host pointer for the matrix.
rowsThe number of rows of the matrix.
n_varsThe number of columns of the matrix.
static void Debug::debugHostComplex ( const char *  label,
FFT_TYPE *  ptr,
int  rows,
int  n_vars 
) [inline, static]

Print a CPU matrix of complex numbers (FFT_TYPE) to the standard output.

Parameters:
labelThe output label to be printed.
ptrThe Host pointer for the matrix.
rowsThe number of rows of the matrix.
n_varsThe number of columns of the matrix.
static void Debug::traceError ( const char *  msg) [inline, static]

Prinf a simple char message as Error information to the error stream.

Parameters:
msgThe message.
static void Debug::traceInfo ( const char *  msg) [inline, static]

Prinf a simple char message as Trace information to the output stream.

Parameters:
msgThe message.

The documentation for this class was generated from the following files:
 All Classes Functions