Define and call copy-cl-to-c and copy-c-to-cl only for non-native implementations; they include checks of the flags c-invalid and cl-invalid. Make sure synchronization is called at the right points. Make sure that flags are set at the right points and cleared after a copy. Not tested yet. Any per-function problems are likely from incorrect listing of inputs and/or outputs.
Showing with 9 additions and 11 deletions