35 #ifndef _BLAZE_UTIL_TRACING_FUNCTIONTRACE_H_ 36 #define _BLAZE_UTIL_TRACING_FUNCTIONTRACE_H_ 43 #if BLAZE_HPX_PARALLEL_MODE 44 # include <hpx/include/threads.hpp> 45 #elif BLAZE_CPP_THREADS_PARALLEL_MODE 47 #elif BLAZE_BOOST_THREADS_PARALLEL_MODE 48 # include <boost/thread/thread.hpp> 49 #elif BLAZE_OPENMP_PARALLEL_MODE 84 inline FunctionTrace(
const std::string& file,
const std::string&
function );
104 void*
operator new ( std::size_t ) =
delete;
105 void*
operator new[]( std::size_t ) =
delete;
106 void*
operator new ( std::size_t,
const std::nothrow_t& ) noexcept =
delete;
107 void*
operator new[]( std::size_t,
const std::nothrow_t& ) noexcept =
delete;
109 void operator delete (
void* ) noexcept =
delete;
110 void operator delete[](
void* ) noexcept =
delete;
111 void operator delete (
void*,
const std::nothrow_t& ) noexcept =
delete;
112 void operator delete[](
void*,
const std::nothrow_t& ) noexcept =
delete;
144 , function_( function )
146 std::ostringstream oss;
149 #if BLAZE_HPX_PARALLEL_MODE 150 oss <<
"[Thread " << hpx::this_thread::get_id() <<
"]";
151 #elif BLAZE_CPP_THREADS_PARALLEL_MODE 152 oss <<
"[Thread " << std::this_thread::get_id() <<
"]";
153 #elif BLAZE_BOOST_THREADS_PARALLEL_MODE 154 oss <<
"[Thread " << boost::this_thread::get_id() <<
"]";
155 #elif BLAZE_OPENMP_PARALLEL_MODE 156 oss <<
"[Thread " << omp_get_thread_num() <<
"]";
159 oss <<
" Entering function '" <<
function_ <<
"' in file '" <<
file_ <<
"'\n";
160 std::cerr << oss.str();
178 std::ostringstream oss;
181 #if BLAZE_OPENMP_PARALLEL_MODE 182 oss <<
"[Thread " << omp_get_thread_num() <<
"]";
183 #elif BLAZE_CPP_THREADS_PARALLEL_MODE 184 oss <<
"[Thread " << std::this_thread::get_id() <<
"]";
185 #elif BLAZE_BOOST_THREADS_PARALLEL_MODE 186 oss <<
"[Thread " << boost::this_thread::get_id() <<
"]";
187 #elif BLAZE_HPX_PARALLEL_MODE 188 oss <<
"[Thread " << hpx::this_thread::get_id() <<
"]";
191 oss <<
" Leaving function '" <<
function_ <<
"' in file '" <<
file_ <<
"'\n";
192 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:142
RAII object for function tracing.The FunctionTrace class is an auxiliary helper class for the tracing...
Definition: FunctionTrace.h:78
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
System settings for the shared-memory parallelization.
std::string file_
The file name the traced function is contained in.
Definition: FunctionTrace.h:120
~FunctionTrace()
Destructor for the FunctionTrace class.
Definition: FunctionTrace.h:176
std::string function_
The name of the traced function.
Definition: FunctionTrace.h:121
System settings for the debugging policy of the Blaze library.