/usr/lib/petscdir/3.4.2/include/sieve/ALE_log.hh is in libpetsc3.4.2-dev 3.4.2.dfsg1-8.1+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | #ifndef included_ALE_ALE_log_hh
#define included_ALE_ALE_log_hh
#include <petscsys.h>
namespace ALE {
int getVerbosity();
void setVerbosity(const int& verbosity);
typedef PetscClassId LogCookie;
typedef int LogStage;
typedef PetscLogEvent LogEvent;
LogCookie LogCookieRegister(const char *name);
LogStage LogStageRegister(const char *name);
void LogStagePush(LogStage stage);
void LogStagePop(LogStage stage);
LogEvent LogEventRegister(LogCookie cookie, const char* event_name);
LogEvent LogEventRegister(const char* event_name);
void LogEventBegin(LogEvent e);
void LogEventEnd(LogEvent e);
} // namespace ALE
// Helper macros that push and pop log stages bracketing method invocations.
// These depend on the __FUNCT__ macro being declared correctly -- as the qualified method name (e.g., PreSieve::cone).
// Every ALE_LOG_STAGE_BEGIN must be matched by a corresponding ALE_LOG_STAGE_END.
// For proper logging, these macro calls must be placed outside of all code in a function, including variable declaration,
// except return value declaration and the actual return statement. This might require some code rearrangement.
// In particular, returns from inside the block bracketed by the macros will break the stage stack.
// ALE_LOG_STAGE_START and ALE_LOG_STAGE_FINISH mirror the corresponding BEGIN and END macros, except that they do not contain
// opening and closing braces and can be used more freely throughout the code
// ALE_LOG_EVENT_START and ALE_LOG_EVENT_FINISH can likewise be used throughout the code to start and stop logging of an event
// associate with the function __FUNCT__. The difference between function stages and events is implementation-dependent
// (currently PETSc logging).
#if (defined ALE_USE_LOGGING) && (defined ALE_LOGGING_USE_STAGES)
#define ALE_LOG_STAGE_START \
{ \
ALE::LogStage stage = ALE::LogStageRegister(__FUNCT__); \
ALE::LogStagePush(stage); \
}
#define ALE_LOG_STAGE_FINISH \
{ \
ALE::LogStage stage = ALE::LogStageRegister(__FUNCT__); \
ALE::LogStagePop(stage); \
}
#define ALE_LOG_STAGE_BEGIN ALE_LOG_STAGE_START {
#define ALE_LOG_STAGE_END } ALE_LOG_STAGE_FINISH
#else
#define ALE_LOG_STAGE_START {}
#define ALE_LOG_STAGE_FINISH {}
#define ALE_LOG_STAGE_BEGIN {}
#define ALE_LOG_STAGE_END {}
#endif
#if (defined ALE_USE_LOGGING) && (defined ALE_LOGGING_USE_EVENTS)
#define ALE_LOG_EVENT_BEGIN \
{ \
ALE::LogEvent event = ALE::LogEventRegister(__FUNCT__); \
ALE::LogEventBegin(event); \
}
#define ALE_LOG_EVENT_END \
{ \
ALE::LogEvent event = ALE::LogEventRegister(__FUNCT__); \
ALE::LogEventEnd(event); \
}
#else
#define ALE_LOG_EVENT_BEGIN {}
#define ALE_LOG_EVENT_END {}
#endif
#endif
|