magneto Posted April 15, 2012 Author Share Posted April 15, 2012 Sorry by no need for type, I meant being able to create any attribute and then access a component of it. So creating an offset and then plugging each component into different fields separately. How do you do: magicname == "magicfloat" Are you relying on hardcoded attribute names? Also another problem with this is, if you change the attribute name, then you have to update all parameters using this string, but attributes using $ or an expression get updated automatically, right? Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted April 15, 2012 Share Posted April 15, 2012 Sorry by no need for type, I meant being able to create any attribute and then access a component of it. So creating an offset and then plugging each component into different fields separately. How do you do: magicname == "magicfloat" Are you relying on hardcoded attribute names? Yeah. you can do this this way or with type menu. There is no type checking in VEX. Also another problem with this is, if you change the attribute name, then you have to update all parameters using this string, but attributes using $ or an expression get updated automatically, right? Try to not access custom attributes with $. It's bad. You adding this way another layer that you don't need. It is only useful if you want acces this attribute down the branch. If you want to use it in branch that is not below where you create it, you still have to use point/primitive/detail expression to get it. If you link everything correctly it should update. Quote Link to comment Share on other sites More sharing options...
magneto Posted April 15, 2012 Author Share Posted April 15, 2012 So you recommend always accessing attributes using expressions? If it's a better practice, I will use it for sure. Quote Link to comment Share on other sites More sharing options...
symek Posted April 15, 2012 Share Posted April 15, 2012 VOPs can't work with point expressions, since that would ruin the advantage of SIMD architecture, when you need to marshal an input data at once to send it down to SIMD engine. point() evaluates per point, sequentially, thus good bye beloved parallelism... 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted April 15, 2012 Author Share Posted April 15, 2012 (edited) Thanks Symek, it's good to know the reason. But why not make the point expression SIMD as well? Is this not possible? Or some VEX compilation trickery where the compiler could add the equivalent of point expression using the import VEX function in code behind the scenes? Edited April 15, 2012 by magneto Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.