implement cuda versions for index operators