[Mono-dev] Mono SIMD Function Declarations and Timing

Rodrigo Kumpera kumpera at gmail.com
Fri Nov 21 17:35:12 EST 2008


On Fri, Nov 21, 2008 at 12:13 AM, JTalton <talton at gmail.com> wrote:

>
> Hello,
>
> How is this affected by the SIMD?  It looks like the generated assembly
> from
> the PDC slides gets rid of much of overhead from the copying of structure.
> So in the case of Mono, this may not be an issue.  If you run the same code
> under .NET (which currently does not have SIMD support), it would matter.


So does running it on mono versions that doesn't support SIMD intrinsics.
This is
why the SimdRuntime class is your friend. It lets you probe if a method will
be properly
accelerated or not.


> It would be nice to have a Vector3f since when using OpenGL you send a
> buffer of Vectors and with Vector4f you have a third more data to send to
> the graphics card.  Not sure if this is doable, or if SIMD must work on a
> full 128 bits.
>

Mono.Simd is a way to expose the available hardware functionality. Higher
level
functionality such as this is going to be developed as a separate lib.


>
> I think I saw that SIMD only supported 128 bits, so a Vector of 3 doubles
> would not work.  Is there a way to make a Vector of 3 double or 4 doubles
> that uses two SIMD instructons? i.e. like a Vector4D was actually 2
> Vector2Ds? (I know there are some issues, but thoughts?)


There is not need for that, just declare a struct with 2 Vector2d elements
and
use it. Some algorithms will be different from the Vector4f equivalent, but
that's
expected.



>
>
> While it is nice to have Properties for the variables in the vector, it
> would be nice to have the variables exposed.  This is needed since calling
> into the OpenGL functions would work cleaner with GL.Normal3(ref vector.X).
>

Can you explain this in more details? Right we don't expose the variables
because
it would be a lot harder to generate intrinsified code. All in all, a simd
algorithms should
not use the individual elements as much as possible because the result code
is slower.


> Matrices and Quaternions?  If matrices are implemented, I'd like to see
> them
> compatible with OpenGL's matrix format.
>

Those things won't be implemented in Mono.Simd itself, but by external
libraries.


>
>
> Sorry if I covered anything that has been brought up before.  I searched
> all
> the SIMD threads and did not see any of this covered.
>
> I plan to get the SIMD accelerated library and test some things out when I
> find the time.  If there is anything I can do to help, from testing to
> reviewing interfaces to documentation, let me know.
>
>
Keep questioning all aspects of it and post your impressions of using it.
This library
needs real usage to have it's design proven.

The recurring issue of not having a higher level lib still needs to be
addressed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20081121/a8db30d1/attachment.html 


More information about the Mono-devel-list mailing list