mitsuba-renderer / drjit

Dr.Jit — A Just-In-Time-Compiler for Differentiable Rendering
BSD 3-Clause "New" or "Revised" License
593 stars 43 forks source link

Query/Feature request - pairwise broadcasting? #93

Open oliver-batchelor opened 2 years ago

oliver-batchelor commented 2 years ago

Hi,

Thanks for this great tool - I've been finding it very useful programming parts of a 3D processing pipeline for plant geometry, so far finding it much more convenient than similar libraries.

My question is, if it is possible to compute pairwise interactions with a function, for example to compute a distance matrix between Array3f or operations like large (larger than 4x4) matrix multiplication? Is there a way for example to implement a small MLP like this?

My approach thus far is to loop over one of the dimensions - would that be the recommended way to go about this, or am I abusing the tool for something it probably isn't meant for?

Thanks, Oliver