QUDA v0.4.0
A library for QCD on GPUs
Defines | Functions
quda/include/util_quda.h File Reference
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Defines

#define printfQuda(...)
#define errorQuda(...)
#define warningQuda(...)
#define checkCudaError()

Functions

void stopwatchStart ()
double stopwatchReadSeconds ()

Define Documentation

#define checkCudaError ( )
Value:
do {                           \
  cudaError_t error = cudaGetLastError();               \
  if (error != cudaSuccess)                             \
    errorQuda("(CUDA) %s", cudaGetErrorString(error));  \
} while (0)

Definition at line 75 of file util_quda.h.

#define errorQuda (   ...)
Value:
do {                 \
  printf("QUDA error: " __VA_ARGS__);   \
  printf(" (" __FILE__ ":%d in %s())\n", __LINE__, __FUNCTION__);       \
  exit(1);                                   \
} while (0)

Definition at line 51 of file util_quda.h.

#define printfQuda (   ...)
Value:
do {                            \
    printf(__VA_ARGS__);                                \
    fflush(stdout); } while (0)

Definition at line 46 of file util_quda.h.

#define warningQuda (   ...)
Value:
do {                \
  printfQuda("QUDA warning: " __VA_ARGS__);  \
  printfQuda("\n");                          \
} while (0)

Definition at line 59 of file util_quda.h.


Function Documentation

double stopwatchReadSeconds ( )

Definition at line 12 of file util_quda.cpp.

void stopwatchStart ( )

Definition at line 8 of file util_quda.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines