Basics of reimplementation in thrust