implemented CuFunction