Jump to content

  • Log In with Google      Sign In   
  • Create Account


BClarenbach

Member Since 04 Oct 2012
Offline Last Active May 23 2013 08:17 AM

Posts I've Made

In Topic: AngelScript 2.26.0 is out

06 February 2013 - 07:49 AM

* CScriptBuilder::AddSectionFromMemory() now requires a name and an optional length for the buffer in case it is not null terminated (Thanks Paril101)

 

was a dangerous change because it swaps the order of parameters but because of the new default parameter, its not obvious when you update. :)


In Topic: Type-Casting single reference types

11 December 2012 - 03:59 AM

Thanks, NOCOUNT did what I wanted. :) I know the lifetime of both objects and scripts, so there is no danger of dangling references

In Topic: 16 Byte Alignment on Value Types

06 December 2012 - 09:54 AM

Never mind, forgot to switch the type registration from value back to scoped. .. .

In Topic: 16 Byte Alignment on Value Types

06 December 2012 - 09:44 AM

Hi,

I tried to implement your wrapper idea but it seems that the type registration does not allow @ modifiers when using scoped types.
[source lang="bash"]Object handle is not supported for this typeFailed in call to function 'RegisterObjectMethod' with 'vector' and 'vector @opAdd(const vector &in) const' (Code: -10)[/source]

Any ideas? The signature of the wrapper is like you mentioned in your post.

Thanks for the help!

In Topic: 16 Byte Alignment on Value Types

05 December 2012 - 10:56 AM

With modern SIMD architectures, we're looking mostly at 4 and 16 byte alignments. If AS would provide those two, my guesstimate is that almost everyone is happy.

If your class needs 8 bytes alignment, you are probably happy with 16 byte alignments, too.
If your class needs alignments over 16 bytes, you are most likely ok to allocate the memory in a different location and wrap the access. (e.g. 4k pages etc.)

If an align16 object flag is reasonably easy to implement, that would be fabulous. Right now, I had to switch to unaligned reads for my simd types which makes the bridge between native and scripted code somewhat cumbersome. No, I am not going to do performance relevant math operations in scripts :) but passing values in and out of registered functions that use an equivalent math class like we have in the native code makes it easier to read and maintain.

PARTNERS