some codes for GPU