The Python script including the loops will run on the CPU.
Depending on which device self.points is stored and what is used inside self.unit_cube the GPU might be used. In this case a kernel will be executed in each iteration.