/** * \file profile.hpp * \author Dhairya Malhotra, dhairya.malhotra@gmail.com * \date 2-11-2011 * \brief This file contains definition of the class Profile. */ #ifndef _PVFMM_PROFILE_HPP_ #define _PVFMM_PROFILE_HPP_ #include #include #include #include #include #include #ifndef __PROFILE__ #define __PROFILE__ -1 #endif namespace pvfmm{ class Profile{ public: static void Add_FLOP(long long inc); static void Add_MEM(long long inc); static void Tic(const char* name_, const MPI_Comm* comm_=NULL,bool sync_=false, int level=0); static void Toc(); static void print(const MPI_Comm* comm_=NULL); static void reset(); private: static long long FLOP; static long long MEM; static std::stack sync; static std::stack name; static std::stack comm; static std::vector max_mem; static unsigned int enable_depth; static std::stack verb_level; static std::vector e_log; static std::vector s_log; static std::vector n_log; static std::vector t_log; static std::vector f_log; static std::vector m_log; static std::vector max_m_log; }; }//end namespace #endif //_PVFMM_PROFILE_HPP_