|
|
> It is also a compiler problem. You didn't say which compiler you used or
> how you got it to produce 3D!Now code. Essentially there are 3
> possibilities:
>
> 1) You have a compiler which can generate 3D!Code out of "natural" C
> code. This is the ideal case. The same code can be used for 3D!Now
> platforms and for others.
>
> 2) You have a compiler which can generate 3D!Now code, if the C code
> follows a certain pattern. This lets you still write portable C code,
> but it may be arranged unintuitively and therefore hard to maintain
> and even slower than the "natural" code on other platforms.
>
> 3) You used inline assembly. This is very compiler specific. gcc
> definitely uses a different syntax than VC++, and what I remember
> from my DOS programming days, there were differences between MS C
> and Borland C, too. This means a lot of code duplication: Not only
> for different processor types, but for different compilers, too.
>
> So, just to maintain the 4 types of SIMD instructions you mentioned,
> on the main Intel platforms, you may have to maintain 9 or 13
> versions of the same code! And not only you have to maintain it, but
> everybody else who wants to change anything in the affected code.
> Unless this is very localized, the chances that somebody who wants
> to implement a new pattern or media type, has to worry about some
> assembler code he can't even read, seem high to me.
The question is not 1, 2 or 3, the question is for answer 3 you need not
verry mucht time, but answer 1 is also possible, but verry much more work!
Post a reply to this message
|
|