2: static char help[] = "Example of using PetscLikely() and PetscUnlikely().\n\n"; 4: /*T 5: Concepts: optimization, likely, unlikely 6: Processors: n 7: T*/ 9: #include <petscsys.h> 13: int main(int argc,char **argv) 14: { 15: PetscBool flg = PETSC_TRUE; 17: PetscInitialize(&argc,&argv,(char *)0,help); 19: if (PetscLikely(flg)) { 20: /* do something */ 21: } 23: if (PetscUnlikely(flg)) { 24: /* do something */ 25: } 26: PetscFinalize(); 27: return 0; 28: } 29: