[fpc-devel] SSE in FPC

Dariusz Mazur darekm at emadar.com
Sun Nov 30 21:02:17 CET 2008


Florian Klaempfl pisze:
> Dariusz Mazur schrieb:
>   
>> Florian Klaempfl pisze:
>>     
>>> Dariusz Mazur schrieb:
>>>  
>>>       
>>>> Jonas Maebe pisze:
>>>>    
>>>>         
>>>>>> Of course tSSEVector should be declared in System unit.
>>>>>> Then  any one can use SSE intentionally
>>>>>>         
>>>>>>             
>>>>> Why can't you now? It's not like multiplication has any other meaning
>>>>> for arrays. And declaring "magic compiler types" in the system unit is
>>>>> something that should be avoided as much as possible (it makes both
>>>>> the compiler and rtl harder to adapt and understand).
>>>>>       
>>>>>           
>>>> Of course, but SIMD is thing, which has  more and more impact to
>>>> performance. And compiler should respect it (and do this, as Florian
>>>> said). But till now nobody know, where compiler use SSE instruction.     
>>>>         
>>> Of course one knows. For array operations as shown SSE/SSE2 is used if
>>> enabled.
>>> _______________________________________________
>>>   
>>>       
>> Ok. I only want to discover how to use it.
>> if I write
>>
>>  type
>>           tSSEVector = array[0..1] of double
>> var
>>      d1 : tSSeVector;
>>     d2  : array[0..1]of tSSEVector;
>> begin
>>   d1:=d2[0]*d2[1];
>> end;
>>
>> will be work too?
>>     
>
> Yes.
>
>   
Thanks. Now I understand.
>> Or something like this:
>>
>> function f ;
>>
>> var
>>
>>   d1,d2,d3 : array[0..4] of integer;
>> begin
>>
>>     d1:=d2*d3;
>>
>> end;
>>     
>
> No. Not yet implemented iirc.
>   
But will be in the same manner?

-- 
  Darek






More information about the fpc-devel mailing list