cuda example
functions shared and updates