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 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
|
<center><a href="https://gitlab.com/petsc/petsc/-/blob/966382dc56242773704ef5f5cee7aa2db3ebc577/include/petsclogdeprecated.h">Actual source code: petsclogdeprecated.h</a></center><br>
<html>
<head>
<title></title>
<meta name="generator" content="c2html 0.9.6">
<meta name="date" content="2025-04-30T18:14:50+00:00">
</head>
<body bgcolor="#FFFFFF">
<pre width=80>
<a name="line1"> 1: </a><font color="#A020F0">#pragma once</font>
<a name="line3"> 3: </a>#include <A href="../include/petsclog.h.html"><petsclog.h></A>
<a name="line5"> 5: </a><font color="#B22222">/* MANSEC = Sys */</font>
<a name="line6"> 6: </a><font color="#B22222">/* SUBMANSEC = Log */</font>
<a name="line8"> 8: </a><font color="#B22222">/* These data structures are no longer used by any non-deprecated PETSc interface functions */</font>
<a name="line10"> 10: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
<a name="line11"> 11: </a> char *name;
<a name="line12"> 12: </a> <a href="../manualpages/Sys/PetscClassId.html">PetscClassId</a> classid;
<a name="line13"> 13: </a>} PetscClassRegInfo;
<a name="line15"> 15: </a><font color="#4169E1">typedef struct _n_PetscClassRegLog *PetscClassRegLog;</font>
<a name="line16"> 16: </a><font color="#4169E1"><a name="_n_PetscClassRegLog"></a>struct _n_PetscClassRegLog </font>{
<a name="line17"> 17: </a> int numClasses;
<a name="line18"> 18: </a> int maxClasses;
<a name="line19"> 19: </a> PetscClassRegInfo *classInfo;
<a name="line20"> 20: </a>};
<a name="line22"> 22: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
<a name="line23"> 23: </a> <a href="../manualpages/Sys/PetscClassId.html">PetscClassId</a> id;
<a name="line24"> 24: </a> int creations;
<a name="line25"> 25: </a> int destructions;
<a name="line26"> 26: </a> <a href="../manualpages/Sys/PetscLogDouble.html">PetscLogDouble</a> mem;
<a name="line27"> 27: </a> <a href="../manualpages/Sys/PetscLogDouble.html">PetscLogDouble</a> descMem;
<a name="line28"> 28: </a>} PetscClassPerfInfo;
<a name="line30"> 30: </a><font color="#4169E1">typedef struct _n_PetscClassPerfLog *PetscClassPerfLog;</font>
<a name="line31"> 31: </a><font color="#4169E1"><a name="_n_PetscClassPerfLog"></a>struct _n_PetscClassPerfLog </font>{
<a name="line32"> 32: </a> int numClasses;
<a name="line33"> 33: </a> int maxClasses;
<a name="line34"> 34: </a> PetscClassPerfInfo *classInfo;
<a name="line35"> 35: </a>};
<a name="line37"> 37: </a><font color="#4169E1">typedef</font> <font color="#4169E1">struct</font> {
<a name="line38"> 38: </a> char *name;
<a name="line39"> 39: </a> <a href="../manualpages/Sys/PetscClassId.html">PetscClassId</a> classid;
<a name="line40"> 40: </a> <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> collective;
<a name="line41"> 41: </a><font color="#A020F0">#if defined(PETSC_HAVE_TAU_PERFSTUBS)</font>
<a name="line42"> 42: </a> void *timer;
<a name="line43"> 43: </a><font color="#A020F0">#endif</font>
<a name="line44"> 44: </a><font color="#A020F0">#if defined(PETSC_HAVE_MPE)</font>
<a name="line45"> 45: </a> int mpe_id_begin;
<a name="line46"> 46: </a> int mpe_id_end;
<a name="line47"> 47: </a><font color="#A020F0">#endif</font>
<a name="line48"> 48: </a>} PetscEventRegInfo;
<a name="line50"> 50: </a><font color="#4169E1">typedef struct _n_PetscEventRegLog *PetscEventRegLog;</font>
<a name="line51"> 51: </a><font color="#4169E1"><a name="_n_PetscEventRegLog"></a>struct _n_PetscEventRegLog </font>{
<a name="line52"> 52: </a> int numEvents;
<a name="line53"> 53: </a> int maxEvents;
<a name="line54"> 54: </a> PetscEventRegInfo *eventInfo; <font color="#B22222">/* The registration information for each event */</font>
<a name="line55"> 55: </a>};
<a name="line57"> 57: </a><font color="#4169E1">typedef struct _n_PetscEventPerfLog *PetscEventPerfLog;</font>
<a name="line58"> 58: </a><font color="#4169E1"><a name="_n_PetscEventPerfLog"></a>struct _n_PetscEventPerfLog </font>{
<a name="line59"> 59: </a> int numEvents;
<a name="line60"> 60: </a> int maxEvents;
<a name="line61"> 61: </a> <a href="../manualpages/Log/PetscEventPerfInfo.html">PetscEventPerfInfo</a> *eventInfo;
<a name="line62"> 62: </a>};
<a name="line64"> 64: </a><font color="#4169E1"><a name="_PetscStageInfo"></a>typedef struct _PetscStageInfo </font>{
<a name="line65"> 65: </a> char *name;
<a name="line66"> 66: </a> <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> used;
<a name="line67"> 67: </a> <a href="../manualpages/Log/PetscEventPerfInfo.html">PetscEventPerfInfo</a> perfInfo;
<a name="line68"> 68: </a> PetscClassPerfLog classLog;
<a name="line69"> 69: </a><font color="#A020F0">#if defined(PETSC_HAVE_TAU_PERFSTUBS)</font>
<a name="line70"> 70: </a> void *timer;
<a name="line71"> 71: </a><font color="#A020F0">#endif</font>
<a name="line72"> 72: </a>} PetscStageInfo;
<a name="line74"> 74: </a><font color="#4169E1">typedef struct _n_PetscStageLog *PetscStageLog;</font>
<a name="line75"> 75: </a><font color="#4169E1"><a name="_n_PetscStageLog"></a>struct _n_PetscStageLog </font>{
<a name="line76"> 76: </a> int numStages;
<a name="line77"> 77: </a> int maxStages;
<a name="line78"> 78: </a> PetscIntStack stack;
<a name="line79"> 79: </a> int curStage;
<a name="line80"> 80: </a> PetscStageInfo *stageInfo;
<a name="line81"> 81: </a> PetscEventRegLog eventLog;
<a name="line82"> 82: </a> PetscClassRegLog classLog;
<a name="line83"> 83: </a>};
<a name="line85"> 85: </a>PETSC_DEPRECATED_OBJECT(3, 20, 0, <font color="#666666">"<a href="../manualpages/Log/PetscLogGetState.html">PetscLogGetState</a>()"</font>, <font color="#666666">"PetscStageLog is no longer used."</font>) PETSC_UNUSED static PetscStageLog petsc_stageLog = <a href="../manualpages/Sys/PETSC_NULLPTR.html">PETSC_NULLPTR</a>;
<a name="line87"> 87: </a><font color="#B22222">/*@C</font>
<a name="line88"> 88: </a><font color="#B22222"> <a href="../manualpages/Log/PetscLogGetStageLog.html">PetscLogGetStageLog</a> - Deprecated.</font>
<a name="line90"> 90: </a><font color="#B22222"> Level: deprecated</font>
<a name="line92"> 92: </a><font color="#B22222"> Note:</font>
<a name="line93"> 93: </a><font color="#B22222"> PETSc performance logging and profiling is now split up between the logging state (`<a href="../manualpages/Log/PetscLogState.html">PetscLogState</a>`) and the log handler (`<a href="../manualpages/Log/PetscLogHandler.html">PetscLogHandler</a>`).</font>
<a name="line94"> 94: </a><font color="#B22222"> The global logging state is obtained with `<a href="../manualpages/Log/PetscLogGetState.html">PetscLogGetState</a>()`; many log handlers may be used at once (`<a href="../manualpages/Log/PetscLogHandlerStart.html">PetscLogHandlerStart</a>()`) and the default log handler is not directly accessible.</font>
<a name="line96"> 96: </a><font color="#B22222">.seealso: [](ch_profiling), `<a href="../manualpages/Log/PetscLogEventGetPerfInfo.html">PetscLogEventGetPerfInfo</a>()`</font>
<a name="line97"> 97: </a><font color="#B22222">@*/</font>
<a name="line98"> 98: </a>PETSC_DEPRECATED_FUNCTION(3, 20, 0, <font color="#666666">"<a href="../manualpages/Log/PetscLogGetState.html">PetscLogGetState</a>()"</font>, <font color="#666666">"PetscStageLog is no longer used."</font>) static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/Log/PetscLogGetStageLog.html">PetscLogGetStageLog</a>(PetscStageLog *s)
<a name="line99"> 99: </a>{
<a name="line100">100: </a> *s = <a href="../manualpages/Sys/PETSC_NULLPTR.html">PETSC_NULLPTR</a>;
<a name="line101">101: </a> <font color="#4169E1">return</font> <a href="../manualpages/Sys/PetscErrorCode.html">PETSC_SUCCESS</a>;
<a name="line102">102: </a>}
<a name="line104">104: </a><font color="#B22222">/*@C</font>
<a name="line105">105: </a><font color="#B22222"> <a href="../manualpages/Log/PetscStageLogGetCurrent.html">PetscStageLogGetCurrent</a> - Deprecated</font>
<a name="line107">107: </a><font color="#B22222"> Level: deprecated</font>
<a name="line109">109: </a><font color="#B22222">.seealso: [](ch_profiling)</font>
<a name="line110">110: </a><font color="#B22222">@*/</font>
<a name="line111">111: </a>PETSC_DEPRECATED_FUNCTION(3, 20, 0, <font color="#666666">"<a href="../manualpages/Log/PetscLogStateGetCurrentStage.html">PetscLogStateGetCurrentStage</a>()"</font>, <font color="#666666">"PetscStageLog is no longer used."</font>) static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/Log/PetscStageLogGetCurrent.html">PetscStageLogGetCurrent</a>(PetscStageLog a, int *b)
<a name="line112">112: </a>{
<a name="line113">113: </a> (void)a;
<a name="line114">114: </a> *b = -1;
<a name="line115">115: </a> <font color="#4169E1">return</font> <a href="../manualpages/Sys/PetscErrorCode.html">PETSC_SUCCESS</a>;
<a name="line116">116: </a>}
<a name="line118">118: </a><font color="#B22222">/*@C</font>
<a name="line119">119: </a><font color="#B22222"> <a href="../manualpages/Log/PetscStageLogGetEventPerfLog.html">PetscStageLogGetEventPerfLog</a> - Deprecated</font>
<a name="line121">121: </a><font color="#B22222"> Level: deprecated</font>
<a name="line123">123: </a><font color="#B22222"> Note:</font>
<a name="line124">124: </a><font color="#B22222"> PETSc performance logging and profiling is now split up between the logging state (`<a href="../manualpages/Log/PetscLogState.html">PetscLogState</a>`) and the log handler (`<a href="../manualpages/Log/PetscLogHandler.html">PetscLogHandler</a>`).</font>
<a name="line125">125: </a><font color="#B22222"> The global logging state is obtained with `<a href="../manualpages/Log/PetscLogGetState.html">PetscLogGetState</a>()`; many log handlers may be used at once (`<a href="../manualpages/Log/PetscLogHandlerStart.html">PetscLogHandlerStart</a>()`) and the default log handler is not directly accessible.</font>
<a name="line127">127: </a><font color="#B22222">.seealso: [](ch_profiling)</font>
<a name="line128">128: </a><font color="#B22222">@*/</font>
<a name="line129">129: </a>PETSC_DEPRECATED_FUNCTION(3, 20, 0, <font color="#666666">"<a href="../manualpages/Log/PetscLogStateEventGetInfo.html">PetscLogStateEventGetInfo</a>()"</font>, <font color="#666666">"PetscStageLog is no longer used."</font>) static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/Log/PetscStageLogGetEventPerfLog.html">PetscStageLogGetEventPerfLog</a>(PetscStageLog a, int b, PetscEventPerfLog *c)
<a name="line130">130: </a>{
<a name="line131">131: </a> (void)a;
<a name="line132">132: </a> (void)b;
<a name="line133">133: </a> *c = <a href="../manualpages/Sys/PETSC_NULLPTR.html">PETSC_NULLPTR</a>;
<a name="line134">134: </a> <font color="#4169E1">return</font> <a href="../manualpages/Sys/PetscErrorCode.html">PETSC_SUCCESS</a>;
<a name="line135">135: </a>}
<a name="line137">137: </a>PETSC_DEPRECATED_OBJECT(3, 20, 0, <font color="#666666">"<a href="../manualpages/Log/PetscLogLegacyCallbacksBegin.html">PetscLogLegacyCallbacksBegin</a>()"</font>, ) PETSC_UNUSED static <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*PetscLogPLB)(<a href="../manualpages/Log/PetscLogEvent.html">PetscLogEvent</a>, int, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>) = <a href="../manualpages/Sys/PETSC_NULLPTR.html">PETSC_NULLPTR</a>;
<a name="line138">138: </a>PETSC_DEPRECATED_OBJECT(3, 20, 0, <font color="#666666">"<a href="../manualpages/Log/PetscLogLegacyCallbacksBegin.html">PetscLogLegacyCallbacksBegin</a>()"</font>, ) PETSC_UNUSED static <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*PetscLogPLE)(<a href="../manualpages/Log/PetscLogEvent.html">PetscLogEvent</a>, int, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>) = <a href="../manualpages/Sys/PETSC_NULLPTR.html">PETSC_NULLPTR</a>;
<a name="line139">139: </a>PETSC_DEPRECATED_OBJECT(3, 20, 0, <font color="#666666">"<a href="../manualpages/Log/PetscLogLegacyCallbacksBegin.html">PetscLogLegacyCallbacksBegin</a>()"</font>, ) PETSC_UNUSED static <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*PetscLogPHC)(<a href="../manualpages/Sys/PetscObject.html">PetscObject</a>) = <a href="../manualpages/Sys/PETSC_NULLPTR.html">PETSC_NULLPTR</a>;
<a name="line140">140: </a>PETSC_DEPRECATED_OBJECT(3, 20, 0, <font color="#666666">"<a href="../manualpages/Log/PetscLogLegacyCallbacksBegin.html">PetscLogLegacyCallbacksBegin</a>()"</font>, ) PETSC_UNUSED static <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*PetscLogPHD)(<a href="../manualpages/Sys/PetscObject.html">PetscObject</a>) = <a href="../manualpages/Sys/PETSC_NULLPTR.html">PETSC_NULLPTR</a>;
<a name="line142">142: </a>PETSC_DEPRECATED_FUNCTION(3, 20, 0, <font color="#666666">"nothing"</font>, <font color="#666666">"PETSc does not guarantee a stack property of logging events."</font>) static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> PetscLogPushCurrentEvent_Internal(<a href="../manualpages/Log/PetscLogEvent.html">PetscLogEvent</a> e)
<a name="line143">143: </a>{
<a name="line144">144: </a> (void)e;
<a name="line145">145: </a> <font color="#4169E1">return</font> <a href="../manualpages/Sys/PetscErrorCode.html">PETSC_SUCCESS</a>;
<a name="line146">146: </a>}
<a name="line148">148: </a>PETSC_DEPRECATED_FUNCTION(3, 20, 0, <font color="#666666">"nothing"</font>, <font color="#666666">"PETSc does not guarantee a stack property of logging events."</font>) static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> PetscLogPopCurrentEvent_Internal(void)
<a name="line149">149: </a>{
<a name="line150">150: </a> <font color="#4169E1">return</font> <a href="../manualpages/Sys/PetscErrorCode.html">PETSC_SUCCESS</a>;
<a name="line151">151: </a>}
<a name="line153">153: </a><font color="#B22222">/*@C</font>
<a name="line154">154: </a><font color="#B22222"> <a href="../manualpages/Log/PetscLogAllBegin.html">PetscLogAllBegin</a> - Equivalent to `<a href="../manualpages/Log/PetscLogDefaultBegin.html">PetscLogDefaultBegin</a>()`.</font>
<a name="line156">156: </a><font color="#B22222"> Logically Collective on `<a href="../manualpages/Sys/PETSC_COMM_WORLD.html">PETSC_COMM_WORLD</a>`</font>
<a name="line158">158: </a><font color="#B22222"> Level: deprecated</font>
<a name="line160">160: </a><font color="#B22222"> Note:</font>
<a name="line161">161: </a><font color="#B22222"> In previous versions, PETSc's documentation stated that `<a href="../manualpages/Log/PetscLogAllBegin.html">PetscLogAllBegin</a>()` "Turns on extensive logging of objects and events," which was not actually true.</font>
<a name="line162">162: </a><font color="#B22222"> The actual way to turn on extensive logging of objects and events was, and remains, to call `<a href="../manualpages/Log/PetscLogActions.html">PetscLogActions</a>()` and `<a href="../manualpages/Log/PetscLogObjects.html">PetscLogObjects</a>()`.</font>
<a name="line164">164: </a><font color="#B22222">.seealso: [](ch_profiling), `<a href="../manualpages/Log/PetscLogDump.html">PetscLogDump</a>()`, `<a href="../manualpages/Log/PetscLogDefaultBegin.html">PetscLogDefaultBegin</a>()`, `<a href="../manualpages/Log/PetscLogActions.html">PetscLogActions</a>()`, `<a href="../manualpages/Log/PetscLogObjects.html">PetscLogObjects</a>()`</font>
<a name="line165">165: </a><font color="#B22222">@*/</font>
<a name="line166">166: </a>PETSC_DEPRECATED_FUNCTION(3, 20, 0, <font color="#666666">"<a href="../manualpages/Log/PetscLogDefaultBegin.html">PetscLogDefaultBegin</a>()"</font>, ) static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/Log/PetscLogAllBegin.html">PetscLogAllBegin</a>(void)
<a name="line167">167: </a>{
<a name="line168">168: </a> <font color="#4169E1">return</font> <a href="../manualpages/Log/PetscLogDefaultBegin.html">PetscLogDefaultBegin</a>();
<a name="line169">169: </a>}
<a name="line171">171: </a><font color="#B22222">/*@C</font>
<a name="line172">172: </a><font color="#B22222"> <a href="../manualpages/Log/PetscLogSet.html">PetscLogSet</a> - Deprecated.</font>
<a name="line174">174: </a><font color="#B22222"> Level: deprecated</font>
<a name="line176">176: </a><font color="#B22222"> Note:</font>
<a name="line177">177: </a><font color="#B22222"> PETSc performance logging and profiling is now split up between the logging state (`<a href="../manualpages/Log/PetscLogState.html">PetscLogState</a>`) and the log handler (`<a href="../manualpages/Log/PetscLogHandler.html">PetscLogHandler</a>`).</font>
<a name="line178">178: </a><font color="#B22222"> The global logging state is obtained with `<a href="../manualpages/Log/PetscLogGetState.html">PetscLogGetState</a>()`; many log handlers may be used at once (`<a href="../manualpages/Log/PetscLogHandlerStart.html">PetscLogHandlerStart</a>()`) and the default log handler is not directly accessible.</font>
<a name="line180">180: </a><font color="#B22222">.seealso: [](ch_profiling), `<a href="../manualpages/Log/PetscLogEventGetPerfInfo.html">PetscLogEventGetPerfInfo</a>()`</font>
<a name="line181">181: </a><font color="#B22222">@*/</font>
<a name="line182">182: </a>PETSC_DEPRECATED_FUNCTION(3, 20, 0, <font color="#666666">"<a href="../manualpages/Log/PetscLogLegacyCallbacksBegin.html">PetscLogLegacyCallbacksBegin</a>()"</font>, )
<a name="line183">183: </a><strong><font color="#4169E1"><a name="PetscLogSet"></a>static inline <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/Log/PetscLogSet.html">PetscLogSet</a>(<a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*a)(int, int, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>), <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*b)(int, int, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>))</font></strong>
<a name="line184">184: </a>{
<a name="line185">185: </a> <font color="#4169E1">return</font> <a href="../manualpages/Log/PetscLogLegacyCallbacksBegin.html">PetscLogLegacyCallbacksBegin</a>(a, b, <a href="../manualpages/Sys/PETSC_NULLPTR.html">PETSC_NULLPTR</a>, <a href="../manualpages/Sys/PETSC_NULLPTR.html">PETSC_NULLPTR</a>);
<a name="line186">186: </a>}
</pre>
</body>
</html>
|