[Opensim-dev] FYI: Mono's SIMD Support: Making Mono safe for Gaming
Justin Clark-Casey
jjustincc at googlemail.com
Fri Nov 7 12:02:26 UTC 2008
Hurliman, John wrote:
> Mono has been feature complete for C# 3.0 for a while. It's the C# 3.5 things that are missing, which are not language extensions but new libraries like linq to db and wpf.
Oh cool. Well in that case, it sounds perfectly reasonable from my point of view.
>
> John
>
> -----Original Message-----
> From: opensim-dev-bounces at lists.berlios.de [mailto:opensim-dev-bounces at lists.berlios.de] On Behalf Of Justin Clark-Casey
> Sent: Thursday, November 06, 2008 3:45 PM
> To: opensim-dev at lists.berlios.de
> Subject: Re: [Opensim-dev] FYI: Mono's SIMD Support: Making Mono safe for Gaming
>
> Hurliman, John wrote:
>> It looks like there is a good chance Mono.Simd.dll may start using some
>> of the fancier things added in C# 3.0 like extension methods. Using
>> extension methods would also allow OpenMetaverseTypes.dll to become a
>> set of zero overhead add-ons for the accelerated types instead of thin
>> wrappers for Vector4f (which I'm told will introduce branching overhead).
>>
>>
>>
>> How does everyone feel about making the C# 3.0 switch?
>
> Does Mono implement what is required yet? If it doesn't (and I suspect it doesn't), then this would be a blocker for us.
>
>>
>>
>> *From:* opensim-dev-bounces at lists.berlios.de
>> [mailto:opensim-dev-bounces at lists.berlios.de] *On Behalf Of *Frisby, Adam
>> *Sent:* Tuesday, November 04, 2008 6:19 AM
>> *To:* opensim-dev at lists.berlios.de
>> *Subject:* Re: [Opensim-dev] FYI: Mono's SIMD Support: Making Mono safe
>> for Gaming
>>
>>
>>
>> Hrrm, what does it take for us to implement this - can we get openmv to
>> derive from the appropriate classes internally? Etc.
>>
>>
>>
>> Adam Frisby
>>
>> Executive Director
>>
>> Deep Think Labs
>>
>>
>>
>> p: +61 (0)8 6262-9464
>>
>> m: +61 (0)410 615-247
>>
>> e: adam at deepthink.com.au
>>
>>
>>
>> *From:* opensim-dev-bounces at lists.berlios.de
>> [mailto:opensim-dev-bounces at lists.berlios.de] *On Behalf Of *Alan M Webb
>> *Sent:* Tuesday, 4 November 2008 11:02 PM
>> *To:* opensim-dev at lists.berlios.de
>> *Subject:* Re: [Opensim-dev] FYI: Mono's SIMD Support: Making Mono safe
>> for Gaming
>>
>>
>>
>>
>> Very cool.
>>
>> Best regards
>> Alan
>> -------------------
>> T.J. Watson Research Center, Hawthorne, NY
>> 1-914-784-7286
>> alan_webb at us.ibm.com
>>
>> *Eugen Leitl <eugen at leitl.org>*
>> Sent by: opensim-dev-bounces at lists.berlios.de
>>
>> 11/04/2008 08:37 AM
>>
>> Please respond to
>> opensim-dev at lists.berlios.de
>>
>>
>>
>> To
>>
>>
>>
>> opensim-dev at lists.berlios.de
>>
>> cc
>>
>>
>>
>> Subject
>>
>>
>>
>> [Opensim-dev] FYI: Mono's SIMD Support: Making Mono safe for Gaming
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> http://tirania.org/blog/archive/2008/Nov-03.html
>>
>> Mono's SIMD Support: Making Mono safe for Gaming
>>
>> This week at the Microsoft PDC we introduced a new feature in the Mono
>> virtual machine that we have been working on quietly and will appear in
>> our upcoming Mono 2.2 release (due in early December).
>>
>> I believe we are the first VM for managed code that provides an
>> object-oriented API to the underlying CPU SIMD instructions.
>>
>> In short, this means that developers will be able to use the types in
>> the Mono.Simd library and have those mapped directly to efficient vector
>> operations on the hardware that supports it.
>>
>> With Mono.Simd, the core of a vector operations like updating the
>> coordinates on an existing vector like the following example will go
>> from 40-60 CPU instructions into 4 or so SSE instructions.
>>
>> Vector4f Move (Vector4f [] pos, ref Vector4f delta)
>> {
>> for (int i = 0; i < pos.Length; i++)
>> pos [i] += delta;
>> }
>>
>>
>> Which in C# turns out to be a call into the method Vector4f.operator +
>> (Vector4f a, Vector4f b) that is implemented like this:
>>
>> Vector3f static operator + (Vector3f a, Vector3f b)
>> {
>> return new Vector3f (a.x+b.x, a.y+b.y, a.z+b.z, a.w+b.w);
>> }
>>
>>
>> The core of the operation is inlined in the `Move' method and it looks
>> like this:
>>
>> movups (%eax),%xmm0
>> movups (%edi),%xmm1
>> addps %xmm1,%xmm0
>> movups %xmm0,(%eax)
>>
>> etc.
>>
>> --
>> Eugen* Leitl <a href="http://leitl.org">leitl</a> http://leitl.org
>> ______________________________________________________________
>> ICBM: 48.07100, 11.36820 http://www.ativel.com http://postbiota.org
>> 8B29F6BE: 099D 78BA 2FD3 B014 B08A 7779 75B0 2443 8B29 F6BE
>> _______________________________________________
>> Opensim-dev mailing list
>> Opensim-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-dev
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Opensim-dev mailing list
>> Opensim-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
--
justincc
Justin Clark-Casey
http://justincc.wordpress.com
More information about the Opensim-dev
mailing list