Swarm-NG  1.1
common.hpp File Reference

Common external (and some internal) library headers used by all components of swarm. More...

#include <cassert>
#include <cmath>
#include <stdint.h>
#include <cstring>
#include <cstdio>
#include <iostream>
#include <fstream>
#include <string>
#include <stdexcept>
#include <map>
#include <vector>
#include <set>
#include <algorithm>
#include <limits>
#include <sstream>
#include <valarray>
#include <boost/shared_ptr.hpp>
#include <boost/bind.hpp>
#include <cuda.h>
#include <cuda_runtime.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include "runtime_error.hpp"

Go to the source code of this file.

Macros

#define x   ) (std::cerr << __FILE__ << "(" << __FUNCTION__ << "):" << __LINE__ << " |> " << (x) << std::endl)
 To debug output a value.
 
#define _(x)   (std::cerr << __FILE__ << "(" << __FUNCTION__ << "):" << __LINE__ << " " << (#x) << " = " << (x) << std::endl)
 Show the an expression and its value for debugging.
 
#define std   ::cerr << __FILE__ << "(" << __FUNCTION__ << "):" << __LINE__ << " @@ " << std::endl)
 To indicate when the execution reaches a specific line in code.
 

Detailed Description

Common external (and some internal) library headers used by all components of swarm.

This file can be compiled as a precompiled header.

External libraries referenced:

  • Standard C++ Library
  • Boost libraries (bind, shared_ptr)
  • CUDA runtime library
  • Linux libc headers

Internal headers referenced:

  • Common error handling: base class for all other exceptions

Some useful debugging and CUDA macros

Definition in file common.hpp.