implemented thrust library