Well the complexity of the operation with a mask is of the size of the Tensor. Because for every entry, it needs to check the mask value.
For the indices, it just reads the values at the given indices, so the complexity is the number of indices.