discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] runtime generation and combination of inner-loops (as


From: Martin Dvh
Subject: [Discuss-gnuradio] runtime generation and combination of inner-loops (assembler/SIMD)
Date: Thu, 25 Aug 2005 07:27:48 +0200
User-agent: Debian Thunderbird 1.0.2 (X11/20050331)

Hi,
I just found this:
http://softwire.sourceforge.net/

With Softwire you can generate and optimize your inner-loops in x86/3dnow/sse 
assembler at runtime.

I thought that maybe we could use this to combine the innerloops of several 
blocks in the flowgraph to one loop.
(As long as all the blocks have the same number and type of input and output 
items and don't look ahead)

This way you save all the copying from buffer to buffer to buffer to buffer.
It supports dynamic register allocation.

Greetings,
Martin


SoftWire is a run-time x86 assembler, written in C++. It can be used as a JIT compiler back-end for scripting languages, or for dynamic code generation of optimized inner loops.

Flexible software is mostly slower than dedicated software, and especially slower than dedicated hardware. Take for example 3D rendering. Popular API's like OpenGL and Direct3D often have software implementations which support all the different rendering modes also supported by hardware, but are terribly slow. Dedicated software engines like the one in the Unreal game use hand-optimized assembly and have good performance but lack flexibility. This is because it's nearly impossible to write all different combinations of render modes in optimized assembly. Hardware accelerated 3D rendering is very fast and flexible, but you're still restricted to the implemented features and certain quality. To have total flexibility and to keep good performance, the inner loops should be generated at run-time, which requires some sort of self-modifying code.

It is capable of compiling assembly code at run-time and selecting those instructions which are needed for a certain situation by using conditional compilation, linking it with external data in your project and loading it into memory so it can be called directly. It combines the flexibility of hardware with the performance of optimized assembly. It's like rewiring the instructions in your inner loop to have the right code for every situation, hence the name of the project. It also doesn't have any limitations like hardware since the CPU is 'general purpose' and all memory is shared. It supports the newest SIMD instruction sets like MMX, 3DNow!, SSE and SSE2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]