Using GPU-optimized helper functions