Cpp vs CCpp targets #997
-
The documentation says:
I'm interested in the combination that CCpp provides: application code in C++ and federation. However, what's the (recommended) advantage of using the C++ scheduler instead of the C version (where the latter provides both, federation and clock synchronization)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
In the Cpp target, reactions are written using a C++ style, whereas in the CCpp target, they are written with a C style. Specifically, accessing inputs, state variables, and parameters is via method calls in the Cpp target. Also, the type system is more flexible in the Cpp target, supporting generics and handling allocation/deallocation in a more intuitive way. Also, the code generated by the Cpp target is more elegant and is object oriented. I think (hope) the Cpp target will eventually support federated execution, at which point the CCpp target may become less interesting, but I'm not sure about that. |
Beta Was this translation helpful? Give feedback.
In the Cpp target, reactions are written using a C++ style, whereas in the CCpp target, they are written with a C style. Specifically, accessing inputs, state variables, and parameters is via method calls in the Cpp target. Also, the type system is more flexible in the Cpp target, supporting generics and handling allocation/deallocation in a more intuitive way. Also, the code generated by the Cpp target is more elegant and is object oriented.
I think (hope) the Cpp target will eventually support federated execution, at which point the CCpp target may become less interesting, but I'm not sure about that.