1. petsc
  2. PETSc
  3. petsc


Jed Brown  committed 6eb7abf

PetscStackAMS: define dummy stubs for AMS stack viewing in optimized builds

These are not called in performance-sensitive locations and we might add
support for using libunwind to get a stack for AMS viewing purposes, so
I'd rather have stubs in pstack.c than use macros in the header to
compile out the calls.

  • Participants
  • Parent commits 7f40f52
  • Branches master

Comments (0)

Files changed (1)

File src/sys/error/pstack.c

View file
+#if defined(PETSC_HAVE_AMS)     /* AMS stack functions do nothing in optimized mode */
+void PetscStackAMSGrantAccess(void) {}
+void PetscStackAMSTakeAccess(void) {}
+PetscErrorCode PetscStackViewAMS(void)
+  return 0;
+#undef __FUNCT__
+#define __FUNCT__ "PetscStackAMSViewOff"
+PetscErrorCode  PetscStackAMSViewOff(void)
+  PetscFunctionBegin;
+  PetscFunctionReturn(0);