35 #ifndef _BLAZE_UTIL_TRACING_FUNCTIONTRACE_H_ 36 #define _BLAZE_UTIL_TRACING_FUNCTIONTRACE_H_ 43 #if BLAZE_OPENMP_PARALLEL_MODE 45 #elif BLAZE_CPP_THREADS_PARALLEL_MODE 47 #elif BLAZE_BOOST_THREADS_PARALLEL_MODE 48 # include <boost/thread/thread.hpp> 82 inline FunctionTrace(
const std::string& file,
const std::string&
function );
102 void*
operator new ( std::size_t ) =
delete;
103 void*
operator new[]( std::size_t ) =
delete;
104 void*
operator new ( std::size_t,
const std::nothrow_t& ) noexcept =
delete;
105 void*
operator new[]( std::size_t,
const std::nothrow_t& ) noexcept =
delete;
107 void operator delete (
void* ) noexcept =
delete;
108 void operator delete[](
void* ) noexcept =
delete;
109 void operator delete (
void*,
const std::nothrow_t& ) noexcept =
delete;
110 void operator delete[](
void*,
const std::nothrow_t& ) noexcept =
delete;
144 std::ostringstream oss;
147 #if BLAZE_OPENMP_PARALLEL_MODE 148 oss <<
"[Thread " << omp_get_thread_num() <<
"]";
149 #elif BLAZE_CPP_THREADS_PARALLEL_MODE 150 oss <<
"[Thread " << std::this_thread::get_id() <<
"]";
151 #elif BLAZE_BOOST_THREADS_PARALLEL_MODE 152 oss <<
"[Thread " << boost::this_thread::get_id() <<
"]";
155 oss <<
" Entering function '" <<
function_ <<
"' in file '" <<
file_ <<
"'\n";
156 std::cerr << oss.str();
174 std::ostringstream oss;
177 #if BLAZE_OPENMP_PARALLEL_MODE 178 oss <<
"[Thread " << omp_get_thread_num() <<
"]";
179 #elif BLAZE_CPP_THREADS_PARALLEL_MODE 180 oss <<
"[Thread " << std::this_thread::get_id() <<
"]";
181 #elif BLAZE_BOOST_THREADS_PARALLEL_MODE 182 oss <<
"[Thread " << boost::this_thread::get_id() <<
"]";
185 oss <<
" Leaving function '" <<
function_ <<
"' in file '" <<
file_ <<
"'\n";
186 std::cerr << oss.str();
Header file for a compiler independent type/function signature macro.
FunctionTrace(const std::string &file, const std::string &function)
Constructor for the FunctionTrace class.
Definition: FunctionTrace.h:140
RAII object for function tracing.The FunctionTrace class is an auxiliary helper class for the tracing...
Definition: FunctionTrace.h:76
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
System settings for the shared-memory parallelization.
std::string file_
The file name the traced function is contained in.
Definition: FunctionTrace.h:118
~FunctionTrace()
Destructor for the FunctionTrace class.
Definition: FunctionTrace.h:172
std::string function_
The name of the traced function.
Definition: FunctionTrace.h:119
System settings for the debugging policy of the Blaze library.