xref: /petsc/src/sys/tutorials/ex6.c (revision f312b9440342594fb778b0f6acedd27284658bfc)
1 
2 static char help[] = "Example of using PetscLikely() and PetscUnlikely().\n\n";
3 
4 #include <petscsys.h>
5 
6 int main(int argc,char **argv)
7 {
8   PetscBool      flg = PETSC_TRUE;
9 
10   PetscFunctionBeginUser;
11   PetscCall(PetscInitialize(&argc,&argv,(char*)0,help));
12   if (PetscLikely(flg)) {
13     /* do something */
14   }
15   if (PetscUnlikely(flg)) {
16     /* do something */
17   }
18   PetscCall(PetscFinalize());
19   return 0;
20 }
21 
22 /*TEST
23 
24    test:
25 
26 TEST*/
27