lundi 20 avril 2020

Generating random data using Metal Performance Shaders

I am trying to generate some random integer data for my app with the GPU using MPSMatrixRandom, and I have two questions.

  1. What is the difference between MPSMatrixRandomMTGP32 and MPSMatrixRandomPhilox?

    I understand that these two shaders use different algorithms, but what are the differences between them? Does the performance or output of these two algorithms differ, and if so, how?

  2. What code can you use to implement these shaders?

    I tried to implement them myself, but my app consistently crashes with vague error messages. I'd like to see an example implementation of this being done properly.




Aucun commentaire:

Enregistrer un commentaire