| kspaceFirstOrder3D-CUDA 1.1 The CUDA/C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Functions
Logger.h File Reference

The header file containing a class responsible for printing out info and error messages (stdout, and stderr). More...

`#include <memory>`
`#include <iostream>`
`#include <cuda_runtime.h>`
`#include <Logger/OutputMessages.h>`
`#include <Logger/ErrorMessages.h>`
Include dependency graph for Logger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
class | TLogger
| Static class implementing the user interface by info messages. More...

## Macros
#define | checkCudaErrors(val) CheckErrors ( (val), #val, __FILE__, __LINE__ )
| Macro checking cuda errors and printing the file name and line. Inspired by CUDA common checking routines.

## Functions
template<bool forceSynchronisation = false>
void | CheckErrors (const cudaError_t errorCode, const char *routineName, const char *fileName, const int lineNumber)
| Checks CUDA errors, create an error message and throw an exception. More...

## Detailed Description

Author
  Jiri Jaros
  Faculty of Information Technology
  Brno University of Technology
  jaros.nosp@m.jir@.nosp@m.fit.v.nosp@m.utbr.nosp@m..cz

Version
  kspaceFirstOrder3D 3.4

Date
  19 April 2016, 12:52 (created)
  10 August 2016, 16:44 (revised)

# License

This file is part of the C++ extension of the k-Wave Toolbox (http://www.k-wave.org).
Copyright (C) 2016 Jiri Jaros and Bradley Treeby.

This file is part of the k-Wave. k-Wave is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

k-Wave is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with k-Wave. If not, see http://www.gnu.org/licenses/.

Definition in file Logger.h.

## Function Documentation

template<bool forceSynchronisation = false>

void CheckErrors | ( | const cudaError_t | errorCode,
|  | const char * | routineName,
|  | const char * | fileName,
|  | const int | lineNumber
| ) |  |
| inline

Checks CUDA errors, create an error message and throw an exception. The template parameter should be set to true for the whole code when debugging kernel related errors. Setting it to true for production run will cause IO sampling and storing not to be overlapped.

Parameters

  [in] | errorCode | - Error produced by a cuda routine
  [in] | routineName | - Function where the error happened
  [in] | fileName | - File where the error happened
  [in] | lineNumber | - Line where the error happened

Definition at line 183 of file Logger.h.

Here is the call graph for this function: