If a task is marked [[combinable]] but [[combine]] isn't used to start the function, does it change anything?
I am thinking of certain driver task functions that could in most situations cooperatively multitask and still work properly. It seems courteous to mark them [[combinable]] whenever they meet the requirements so that users have the option.
Is there any down side to doing this?
Effects of combinable
-
- Active Member
- Posts: 47
- Joined: Wed Feb 05, 2014 1:25 am
-
- Respected Member
- Posts: 318
- Joined: Tue Dec 15, 2009 12:46 am
If a task is marked as [[combinable]] then the compiler will create two versions of the function. If you only end up using one of these versions then the other will be eliminated at link time. As such there should be no problem marking the function as combinable (and it is probably good practice), but you might see a slight compilation time hit.teachop wrote:If a task is marked [[combinable]] but [[combine]] isn't used to start the function, does it change anything?
I am thinking of certain driver task functions that could in most situations cooperatively multitask and still work properly. It seems courteous to mark them [[combinable]] whenever they meet the requirements so that users have the option.
Is there any down side to doing this?
-
- Active Member
- Posts: 47
- Joined: Wed Feb 05, 2014 1:25 am
Thank you, that is a nice implementation. Interesting too, I imagine [[distributable]] does the same thing?
-
- Respected Member
- Posts: 318
- Joined: Tue Dec 15, 2009 12:46 am
Yes, if you mark a function as distributable the compiler will also produce different versions.teachop wrote:Thank you, that is a nice implementation. Interesting too, I imagine [[distributable]] does the same thing?