Jump to content

How to access point variables in VEX operators?


Recommended Posts

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?

Link to comment
Share on other sites

Guest mantragora

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.

Link to comment
Share on other sites

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...

  • Like 1
Link to comment
Share on other sites

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 by magneto
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...