1

If I use preprocessor directives like #if, #elif, etc., in my kernel , will it affect the performance in any way? I'm assuming that these conditions are resolved at the compile time itself.

Harsh Wardhan
  • 2,110
  • 10
  • 36
  • 51

1 Answers1

2

If you do live compilation then it will probably have some effect on the compiletime but the on the actual execution of the kernel it won't have any affect since they are resolved at the compile time just as you said. The potential slowdown on compiletime should be way less than doing all those checks at run time.

Jovasa
  • 435
  • 4
  • 14