Skip to content
Discussion options

You must be logged in to vote

(I've converted this to a discussion thread, it seemed more appropriate)

  1. This is partially true. Most of the C++ Mitsuba source code is only written "once". We do however have some snippets where the scalar case is handled explicitly.

  2. To partially continue my answer to 1): the example you point is exactly how you can get around writing code "twice". You consider a scalar.ArrayXf to be similar/equivalent to a cuda.Float. I do think that the typing system in Python is not exhaustive enough to allow you to fully write your code with this ArrayXf approach. For example, I don't think it's possible to have an equivalent to llvm.Array2f in Python and in scalar modes where you'd actually want s…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@njroussel
Comment options

Answer selected by tomas16
@tomas16
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #869 on August 24, 2023 06:17.