UDF Codes for Serial and Parallel Execution

Is it possible to have different UDF code for serial and parallel execution?

Yes, it is possible by using the macros MULTIPLE_COMPUTE_NODE_P, ONE_COMPUTE_NODE_P or ZERO_COMPUTE_NOTE_P.

For more details, please refer to the attached document below: