Skip to content
This repository

Array assignment #26

Open
lgritz opened this Issue · 0 comments

1 participant

Larry Gritz
Larry Gritz
Owner
lgritz commented

WBN to extend the oso "assign" to be able to assign arrays in one instruction. This isn't allowed in OSL at the moment, but happens implicitly if you do structure assignment and the structure contains an array. Making it one assignment, instead of the current code generation for element-by-element copy, will make more compact oso's as well as make it very easy for the LLVM IR generation to turn it into a simple memcpy.

We could also open debate on whether we should allow assignment of arrays in the OSL source language. (The only important counter-argument is simply that C does not allow it, and we try to minimize gratuitous differences from C unless they are significant improvements or specializations for shader programming in particular.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.