why are you looking for the source code for this operation? (just curious). It’s somewhere inside C++, i can pull it up.

x[x<0] seems to be no dimension, Does x and x[x<0] share memory？

I dont understand your question, what do you mean by “no dimension”?