My global array contains struct {float,float}. The first thing I do to it is a 64bit CAS on one of the structs. Depending on the return value I (may) want to modify the second float. Now I have the option of either using a 32bit CAS, or a 64bit. I know (based on the return value of the first CAS) that the first float will not change value again.
- Is it safe to combine 64 bit CAS and 32 bit CAS on the same 64 bit memory?
- Are there performance considerations to pick one or the other?