Modified the cuda example