4
Contains: AltiVec DSP Interfaces
6
Version: Technology: 1.0
7
Release: Universal Interfaces 3.4.2
9
Copyright: � 2000-2002 by Apple Computer, Inc., all rights reserved.
11
Bugs?: For bug reports, consult the following page on
14
http://www.freepascal.org/bugs.html
20
Modified for use with Free Pascal
22
Please report any bugs to <gpc@microbizz.nl>
33
{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
34
{$setc GAP_INTERFACES_VERSION := $0200}
36
{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
37
{$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
40
{$ifc defined CPUPOWERPC and defined CPUI386}
41
{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
43
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
44
{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
47
{$ifc not defined __ppc__ and defined CPUPOWERPC}
52
{$ifc not defined __i386__ and defined CPUI386}
58
{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
59
{$error Conflicting definitions for __ppc__ and __i386__}
62
{$ifc defined __ppc__ and __ppc__}
63
{$setc TARGET_CPU_PPC := TRUE}
64
{$setc TARGET_CPU_X86 := FALSE}
65
{$elifc defined __i386__ and __i386__}
66
{$setc TARGET_CPU_PPC := FALSE}
67
{$setc TARGET_CPU_X86 := TRUE}
69
{$error Neither __ppc__ nor __i386__ is defined.}
71
{$setc TARGET_CPU_PPC_64 := FALSE}
73
{$ifc defined FPC_BIG_ENDIAN}
74
{$setc TARGET_RT_BIG_ENDIAN := TRUE}
75
{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
76
{$elifc defined FPC_LITTLE_ENDIAN}
77
{$setc TARGET_RT_BIG_ENDIAN := FALSE}
78
{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
80
{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
82
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
83
{$setc CALL_NOT_IN_CARBON := FALSE}
84
{$setc OLDROUTINENAMES := FALSE}
85
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
86
{$setc OPAQUE_UPP_TYPES := TRUE}
87
{$setc OTCARBONAPPLICATION := TRUE}
88
{$setc OTKERNEL := FALSE}
89
{$setc PM_USE_SESSION_APIS := TRUE}
90
{$setc TARGET_API_MAC_CARBON := TRUE}
91
{$setc TARGET_API_MAC_OS8 := FALSE}
92
{$setc TARGET_API_MAC_OSX := TRUE}
93
{$setc TARGET_CARBON := TRUE}
94
{$setc TARGET_CPU_68K := FALSE}
95
{$setc TARGET_CPU_MIPS := FALSE}
96
{$setc TARGET_CPU_SPARC := FALSE}
97
{$setc TARGET_OS_MAC := TRUE}
98
{$setc TARGET_OS_UNIX := FALSE}
99
{$setc TARGET_OS_WIN32 := FALSE}
100
{$setc TARGET_RT_MAC_68881 := FALSE}
101
{$setc TARGET_RT_MAC_CFM := FALSE}
102
{$setc TARGET_RT_MAC_MACHO := TRUE}
103
{$setc TYPED_FUNCTION_POINTERS := TRUE}
104
{$setc TYPE_BOOL := FALSE}
105
{$setc TYPE_EXTENDED := FALSE}
106
{$setc TYPE_LONGLONG := TRUE}
107
uses MacTypes,ConditionalMacros;
113
DSPComplexPtr = ^DSPComplex;
119
DSPSplitComplexPtr = ^DSPSplitComplex;
120
DSPSplitComplex = record
125
FFTSetup = ^SInt32; { an opaque 32-bit type }
126
FFTSetupPtr = ^FFTSetup; { when a var xx:FFTSetup parameter can be nil, it is changed to xx: FFTSetupPtr }
127
FFTDirection = SInt32;
129
kFFTDirection_Forward = 1;
130
kFFTDirection_Inverse = -1;
141
�������������������������������������������������������������������������������
142
The criteria to invoke the PowerPC vector implementation is subject to
143
change and become less restrictive in the future.
144
�������������������������������������������������������������������������������
147
�������������������������������������������������������������������������������
148
Functions create_fftsetup and destroy_fftsetup.
150
create_fftsetup will allocate memory and setup a weight array used by
151
the FFT. The call destroy_fftsetup will free the array.
152
�������������������������������������������������������������������������������
158
* Non-Carbon CFM: in vecLib 1.0 and later
159
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
160
* Mac OS X: in version 10.0 and later
162
function create_fftsetup(log2n: UInt32; radix: FFTRadix): FFTSetup; external name '_create_fftsetup';
168
* Non-Carbon CFM: in vecLib 1.0 and later
169
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
170
* Mac OS X: in version 10.0 and later
172
procedure destroy_fftsetup(setup: FFTSetup); external name '_destroy_fftsetup';
176
�������������������������������������������������������������������������������
177
Functions ctoz and ztoc.
179
ctoz converts a complex array to a complex-split array
180
ztoc converts a complex-split array to a complex array
182
Criteria to invoke PowerPC vector code:
186
4. Z.realp and Z.imagp are relatively aligned.
187
5. C is 8-byte aligned if Z.realp and Z.imagp are 4-byte- aligned
188
or C is 16-byte aligned if Z.realp and Z.imagp are at least
190
�������������������������������������������������������������������������������
196
* Non-Carbon CFM: in vecLib 1.0 and later
197
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
198
* Mac OS X: in version 10.0 and later
200
procedure ctoz(const (*var*) C: DSPComplex; strideC: SInt32; var Z: DSPSplitComplex; strideZ: SInt32; size: UInt32); external name '_ctoz';
206
* Non-Carbon CFM: in vecLib 1.0 and later
207
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
208
* Mac OS X: in version 10.0 and later
210
procedure ztoc(const (*var*) Z: DSPSplitComplex; strideZ: SInt32; var C: DSPComplex; strideC: SInt32; size: UInt32); external name '_ztoc';
214
�������������������������������������������������������������������������������
215
Functions fft_zip and fft_zipt
217
In-place Split Complex Fourier Transform with or without temporary memory.
219
Criteria to invoke PowerPC vector code:
221
1. ioData.realp and ioData.imagp must be 16-byte aligned.
224
4. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
226
If any of the above criteria are not satisfied, the PowerPC scalor code
227
implementation will be used. The size of temporary memory for each part
228
is the lower value of 4*n and 16k. Direction can be either
229
kFFTDirection_Forward or kFFTDirection_Inverse.
230
�������������������������������������������������������������������������������
236
* Non-Carbon CFM: in vecLib 1.0 and later
237
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
238
* Mac OS X: in version 10.0 and later
240
procedure fft_zip(setup: FFTSetup; var ioData: DSPSplitComplex; stride: SInt32; log2n: UInt32; direction: FFTDirection); external name '_fft_zip';
246
* Non-Carbon CFM: in vecLib 1.0 and later
247
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
248
* Mac OS X: in version 10.0 and later
250
procedure fft_zipt(setup: FFTSetup; var ioData: DSPSplitComplex; stride: SInt32; var bufferTemp: DSPSplitComplex; log2n: UInt32; direction: FFTDirection); external name '_fft_zipt';
254
�������������������������������������������������������������������������������
255
Functions fft_zop and fft_zopt
257
Out-of-place Split Complex Fourier Transform with or without temporary
260
Criteria to invoke PowerPC vector code:
262
1. signal.realp and signal.imagp must be 16-byte aligned.
264
3. result.realp and result.imagp must be 16-byte aligned.
267
6. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
269
If any of the above criteria are not satisfied, the PowerPC scalor code
270
implementation will be used. The size of temporary memory for each part
271
is the lower value of 4*n and 16k. Direction can be either
272
kFFTDirection_Forward or kFFTDirection_Inverse.
273
�������������������������������������������������������������������������������
279
* Non-Carbon CFM: in vecLib 1.0 and later
280
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
281
* Mac OS X: in version 10.0 and later
283
procedure fft_zop(setup: FFTSetup; var signal: DSPSplitComplex; signalStride: SInt32; var result: DSPSplitComplex; strideResult: SInt32; log2n: UInt32; direction: FFTDirection); external name '_fft_zop';
289
* Non-Carbon CFM: in vecLib 1.0 and later
290
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
291
* Mac OS X: in version 10.0 and later
293
procedure fft_zopt(setup: FFTSetup; var signal: DSPSplitComplex; signalStride: SInt32; var result: DSPSplitComplex; strideResult: SInt32; var bufferTemp: DSPSplitComplex; log2n: UInt32; direction: FFTDirection); external name '_fft_zopt';
297
�������������������������������������������������������������������������������
298
Functions fft_zrip and fft_zript
300
In-Place Real Fourier Transform with or without temporary memory,
303
Criteria to invoke PowerPC vector code:
304
1. ioData.realp and ioData.imagp must be 16-byte aligned.
308
If any of the above criteria are not satisfied, the PowerPC scalor code
309
implementation will be used. The size of temporary memory for each part
310
is the lower value of 4*n and 16k. Direction can be either
311
kFFTDirection_Forward or kFFTDirection_Inverse.
312
�������������������������������������������������������������������������������
318
* Non-Carbon CFM: in vecLib 1.0 and later
319
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
320
* Mac OS X: in version 10.0 and later
322
procedure fft_zrip(setup: FFTSetup; var ioData: DSPSplitComplex; stride: SInt32; log2n: UInt32; direction: FFTDirection); external name '_fft_zrip';
328
* Non-Carbon CFM: in vecLib 1.0 and later
329
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
330
* Mac OS X: in version 10.0 and later
332
procedure fft_zript(setup: FFTSetup; var ioData: DSPSplitComplex; stride: SInt32; var bufferTemp: DSPSplitComplex; log2n: UInt32; direction: FFTDirection); external name '_fft_zript';
336
�������������������������������������������������������������������������������
337
Functions fft_zrop and fft_zropt
339
Out-of-Place Real Fourier Transform with or without temporary memory,
342
Criteria to invoke PowerPC vector code:
343
1. signal.realp and signal.imagp must be 16-byte aligned.
345
3. result.realp and result.imagp must be be 16-byte aligned.
349
If any of the above criteria are not satisfied, the PowerPC scalor code
350
implementation will be used. The size of temporary memory for each part
351
is the lower value of 4*n and 16k. Direction can be either
352
kFFTDirection_Forward or kFFTDirection_Inverse.
353
�������������������������������������������������������������������������������
359
* Non-Carbon CFM: in vecLib 1.0 and later
360
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
361
* Mac OS X: in version 10.0 and later
363
procedure fft_zrop(setup: FFTSetup; var signal: DSPSplitComplex; signalStride: SInt32; var result: DSPSplitComplex; strideResult: SInt32; log2n: UInt32; direction: FFTDirection); external name '_fft_zrop';
369
* Non-Carbon CFM: in vecLib 1.0 and later
370
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
371
* Mac OS X: in version 10.0 and later
373
procedure fft_zropt(setup: FFTSetup; var signal: DSPSplitComplex; signalStride: SInt32; var result: DSPSplitComplex; strideResult: SInt32; var bufferTemp: DSPSplitComplex; log2n: UInt32; direction: FFTDirection); external name '_fft_zropt';
377
�������������������������������������������������������������������������������
378
Functions fft2d_zip and fft2d_zipt
380
In-place two dimensional Split Complex Fourier Transform with or without
383
Criteria to invoke PowerPC vector code:
384
1. ioData.realp and ioData.imagp must be 16-byte aligned.
386
3. strideInCol must be a multiple of 4
387
4. 2 <= log2nInRow <= 12
388
5. 2 <= log2nInCol <= 12
389
6. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
391
If any of the above criteria are not satisfied, the PowerPC scalor code
392
implementation will be used. The size of temporary memory for each part
393
is the lower value of 4*n and 16k. ( log2n = log2nInRow + log2nInCol )
394
Direction can be either kFFTDirection_Forward or kFFTDirection_Inverse.
395
�������������������������������������������������������������������������������
401
* Non-Carbon CFM: in vecLib 1.0 and later
402
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
403
* Mac OS X: in version 10.0 and later
405
procedure fft2d_zip(setup: FFTSetup; var ioData: DSPSplitComplex; strideInRow: SInt32; strideInCol: SInt32; log2nInCol: UInt32; log2nInRow: UInt32; direction: FFTDirection); external name '_fft2d_zip';
411
* Non-Carbon CFM: in vecLib 1.0 and later
412
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
413
* Mac OS X: in version 10.0 and later
415
procedure fft2d_zipt(setup: FFTSetup; var ioData: DSPSplitComplex; strideInRow: SInt32; strideInCol: SInt32; var bufferTemp: DSPSplitComplex; log2nInCol: UInt32; log2nInRow: UInt32; direction: FFTDirection); external name '_fft2d_zipt';
419
�������������������������������������������������������������������������������
420
Functions fft2d_zop and fft2d_zopt
422
Out-of-Place two dimemsional Split Complex Fourier Transform with or
423
without temporary memory
425
Criteria to invoke PowerPC vector code:
427
1. signal.realp and signal.imagp must be 16-byte aligned.
428
2. signalStrideInRow = 1;
429
3. signalStrideInCol must be a multiple of 4
430
4. result.realp and result.imagp must be 16-byte aligned.
431
5. strideResultInRow = 1;
432
6. strideResultInCol must be a multiple of 4
433
7. 2 <= log2nInRow <= 12
434
8. 2 <= log2nInCol <= 12
435
9. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
437
If any of the above criteria are not satisfied, the PowerPC scalor code
438
implementation will be used. The size of temporary memory for each part
439
is the lower value of 4*n and 16k. ( log2n = log2nInRow + log2nInCol )
440
Direction can be either kFFTDirection_Forward or kFFTDirection_Inverse.
441
�������������������������������������������������������������������������������
447
* Non-Carbon CFM: in vecLib 1.0 and later
448
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
449
* Mac OS X: in version 10.0 and later
451
procedure fft2d_zop(setup: FFTSetup; var signal: DSPSplitComplex; signalStrideInRow: SInt32; signalStrideInCol: SInt32; var result: DSPSplitComplex; strideResultInRow: SInt32; strideResultInCol: SInt32; log2nInCol: UInt32; log2nInRow: UInt32; flag: SInt32); external name '_fft2d_zop';
457
* Non-Carbon CFM: in vecLib 1.0 and later
458
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
459
* Mac OS X: in version 10.0 and later
461
procedure fft2d_zopt(setup: FFTSetup; var signal: DSPSplitComplex; signalStrideInRow: SInt32; signalStrideInCol: SInt32; var result: DSPSplitComplex; strideResultInRow: SInt32; strideResultInCol: SInt32; var bufferTemp: DSPSplitComplex; log2nInCol: UInt32; log2nInRow: UInt32; flag: SInt32); external name '_fft2d_zopt';
465
�������������������������������������������������������������������������������
466
Functions fft2d_zrip and fft2d_zript
468
In-place two dimensional Real Fourier Transform with or without temporary
469
memory, Split Complex Format
471
Criteria to invoke PowerPC vector code:
472
1. ioData.realp and ioData.imagp must be 16-byte aligned.
474
3. strideInCol must be a multiple of 4
475
4. 3 <= log2nInRow <= 12
476
5. 3 <= log2nInCol <= 13
477
6. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
479
If any of the above criteria are not satisfied, the PowerPC scalor code
480
implementation will be used. The size of temporary memory for each part
481
is the lower value of 4*n and 16k. ( log2n = log2nInRow + log2nInCol )
482
Direction can be either kFFTDirection_Forward or kFFTDirection_Inverse.
483
�������������������������������������������������������������������������������
489
* Non-Carbon CFM: in vecLib 1.0 and later
490
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
491
* Mac OS X: in version 10.0 and later
493
procedure fft2d_zrip(setup: FFTSetup; var ioData: DSPSplitComplex; strideInRow: SInt32; strideInCol: SInt32; log2nInCol: UInt32; log2nInRow: UInt32; direction: FFTDirection); external name '_fft2d_zrip';
499
* Non-Carbon CFM: in vecLib 1.0 and later
500
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
501
* Mac OS X: in version 10.0 and later
503
procedure fft2d_zript(setup: FFTSetup; var ioData: DSPSplitComplex; strideInRow: SInt32; strideInCol: SInt32; var bufferTemp: DSPSplitComplex; log2nInCol: UInt32; log2nInRow: UInt32; direction: FFTDirection); external name '_fft2d_zript';
507
�������������������������������������������������������������������������������
508
Functions fft2d_zrop and fft2d_zropt
510
Out-of-Place Two-Dimemsional Real Fourier Transform with or without
511
temporary memory, Split Complex Format
513
Criteria to invoke PowerPC vector code:
514
1. signal.realp and signal.imagp must be 16-byte aligned.
515
2. signalStrideInRow = 1;
516
3. signalStrideInCol must be a multiple of 4
517
4. result.realp and result.imagp must be 16-byte aligned.
518
5. strideResultInRow = 1;
519
6. strideResultInCol must be a multiple of 4
520
7. 3 <= log2nInRow <= 12
521
8. 3 <= log2nInCol <= 13
522
9. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
524
If any of the above criteria are not satisfied, the PowerPC scalor code
525
implementation will be used. The size of temporary memory for each part
526
is the lower value of 4*n and 16k. ( log2n = log2nInRow + log2nInCol )
527
Direction can be either kFFTDirection_Forward or kFFTDirection_Inverse.
528
�������������������������������������������������������������������������������
534
* Non-Carbon CFM: in vecLib 1.0 and later
535
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
536
* Mac OS X: in version 10.0 and later
538
procedure fft2d_zrop(setup: FFTSetup; var signal: DSPSplitComplex; signalStrideInRow: SInt32; signalStrideInCol: SInt32; var result: DSPSplitComplex; strideResultInRow: SInt32; strideResultInCol: SInt32; log2nInCol: UInt32; log2nInRow: UInt32; flag: SInt32); external name '_fft2d_zrop';
544
* Non-Carbon CFM: in vecLib 1.0 and later
545
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
546
* Mac OS X: in version 10.0 and later
548
procedure fft2d_zropt(setup: FFTSetup; var signal: DSPSplitComplex; signalStrideInRow: SInt32; signalStrideInCol: SInt32; var result: DSPSplitComplex; strideResultInRow: SInt32; strideResultInCol: SInt32; var bufferTemp: DSPSplitComplex; log2nInCol: UInt32; log2nInRow: UInt32; flag: SInt32); external name '_fft2d_zropt';
552
�������������������������������������������������������������������������������
555
Floating Point Convolution and Correlation
557
Criteria to invoke PowerPC vector code:
558
1. signal and result must have relative alignement.
559
2. 4 <= lenFilter <= 256
564
If any of the above criteria are not satisfied, the PowerPC scalor code
565
implementation will be used. strideFilter can be positive for
566
correlation or negative for convolution.
567
�������������������������������������������������������������������������������
573
* Non-Carbon CFM: in vecLib 1.0 and later
574
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
575
* Mac OS X: in version 10.0 and later
577
procedure conv((*const*) var signal: Single; signalStride: SInt32; (*const*) var filter: Single; strideFilter: SInt32; var result: Single; strideResult: SInt32; lenResult: SInt32; lenFilter: SInt32); external name '_conv';
581
�������������������������������������������������������������������������������
586
Criteria to invoke PowerPC vector code:
587
1. input1 and input2 and result are all relatively aligned.
593
If any of the above criteria are not satisfied, the PowerPC scalor code
594
implementation will be used.
595
�������������������������������������������������������������������������������
601
* Non-Carbon CFM: in vecLib 1.0 and later
602
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
603
* Mac OS X: in version 10.0 and later
605
procedure vadd((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vadd';
609
�������������������������������������������������������������������������������
612
Floating Point Substract
614
Criteria to invoke PowerPC vector code:
615
1. input1 and input2 and result are all relatively aligned.
621
If any of the above criteria are not satisfied, the PowerPC scalor code
622
implementation will be used.
623
�������������������������������������������������������������������������������
629
* Non-Carbon CFM: in vecLib 1.0 and later
630
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
631
* Mac OS X: in version 10.0 and later
633
procedure vsub((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vsub';
637
�������������������������������������������������������������������������������
640
Floating Point Multiply
642
Criteria to invoke PowerPC vector code:
643
1. input1 and input2 and result must be all relatively aligned.
649
If any of the above criteria are not satisfied, the PowerPC scalor code
650
implementation will be used.
651
�������������������������������������������������������������������������������
657
* Non-Carbon CFM: in vecLib 1.0 and later
658
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
659
* Mac OS X: in version 10.0 and later
661
procedure vmul((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vmul';
665
�������������������������������������������������������������������������������
668
Floating Point - Scalar Multiply
670
Criteria to invoke PowerPC vector code:
671
1. input1 and result are all relatively aligned.
676
If any of the above criteria are not satisfied, the PowerPC scalor code
677
implementation will be used.
678
�������������������������������������������������������������������������������
684
* Non-Carbon CFM: in vecLib 1.0 and later
685
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
686
* Mac OS X: in version 10.0 and later
688
procedure vsmul((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; var result: Single; strideResult: SInt32; size: UInt32); external name '_vsmul';
692
�������������������������������������������������������������������������������
695
Floating Point Square
697
Criteria to invoke PowerPC vector code:
698
1. input and result are relatively aligned.
703
If any of the above criteria are not satisfied, the PowerPC scalor code
704
implementation will be used.
705
�������������������������������������������������������������������������������
711
* Non-Carbon CFM: in vecLib 1.0 and later
712
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
713
* Mac OS X: in version 10.0 and later
715
procedure vsq((*const*) var input: Single; strideInput: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vsq';
719
�������������������������������������������������������������������������������
722
Floating Point Signed Square
724
Criteria to invoke PowerPC vector code:
725
1. input and result must be all relatively aligned.
730
If any of the above criteria are not satisfied, the PowerPC scalor code
731
implementation will be used.
732
�������������������������������������������������������������������������������
738
* Non-Carbon CFM: in vecLib 1.0 and later
739
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
740
* Mac OS X: in version 10.0 and later
742
procedure vssq((*const*) var input: Single; strideInput: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vssq';
746
�������������������������������������������������������������������������������
749
Floating Point Dot product
751
Criteria to invoke PowerPC vector code:
752
1. input1 and input2 are relatively aligned.
757
If any of the above criteria are not satisfied, the PowerPC scalor code
758
implementation will be used.
759
�������������������������������������������������������������������������������
765
* Non-Carbon CFM: in vecLib 1.0 and later
766
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
767
* Mac OS X: in version 10.0 and later
769
procedure dotpr((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: Single; size: UInt32); external name '_dotpr';
773
�������������������������������������������������������������������������������
776
Floating Point vadd and Multiply
778
Criteria to invoke PowerPC vector code:
779
1. input1, input2, input_3 and result are all relatively aligned.
786
If any of the above criteria are not satisfied, the PowerPC scalor code
787
implementation will be used.
788
�������������������������������������������������������������������������������
794
* Non-Carbon CFM: in vecLib 1.0 and later
795
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
796
* Mac OS X: in version 10.0 and later
798
procedure vam((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; (*const*) var input3: Single; stride3: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vam';
802
�������������������������������������������������������������������������������
805
Split Complex Convolution and Correlation
807
Criteria to invoke PowerPC vector code:
808
1. signal->realp, signal->imagp, result->realp, result->imagp
809
must be relatively aligned.
810
2. 4 <= lenFilter <= 128
815
If any of the above criteria are not satisfied, the PowerPC scalor code
816
implementation will be used. strideFilter can be positive for correlation
817
or negative for convolution
818
�������������������������������������������������������������������������������
824
* Non-Carbon CFM: in vecLib 1.0 and later
825
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
826
* Mac OS X: in version 10.0 and later
828
procedure zconv(var signal: DSPSplitComplex; signalStride: SInt32; var filter: DSPSplitComplex; strideFilter: SInt32; var result: DSPSplitComplex; strideResult: SInt32; lenResult: SInt32; lenFilter: SInt32); external name '_zconv';
832
�������������������������������������������������������������������������������
837
Criteria to invoke PowerPC vector code:
838
1. input1.realp, input1.imagp, input2.realp, input2.imagp,
839
result.realp, result.imagp must be all relatively aligned.
845
If any of the above criteria are not satisfied, the PowerPC scalor code
846
implementation will be used.
847
�������������������������������������������������������������������������������
853
* Non-Carbon CFM: in vecLib 1.0 and later
854
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
855
* Mac OS X: in version 10.0 and later
857
procedure zvadd(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zvadd';
861
�������������������������������������������������������������������������������
864
Split Complex Substract
866
Criteria to invoke PowerPC vector code:
867
1. input1.realp, input1.imagp, input2.realp, input2.imagp,
868
result.realp, result.imagp must be all relatively aligned.
874
If any of the above criteria are not satisfied, the PowerPC scalor code
875
implementation will be used.
876
�������������������������������������������������������������������������������
882
* Non-Carbon CFM: in vecLib 1.0 and later
883
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
884
* Mac OS X: in version 10.0 and later
886
procedure zvsub(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zvsub';
890
�������������������������������������������������������������������������������
893
Split Complex Multiply
895
Criteria to invoke PowerPC vector code:
896
1. input1.realp, input1.imagp, input2.realp, input2.imagp,
897
result.realp, result.imagp must be all relatively aligned.
903
If any of the above criteria are not satisfied, the PowerPC scalor code
904
implementation will be used. The conjugate value can be 1 or -1.
905
�������������������������������������������������������������������������������
911
* Non-Carbon CFM: in vecLib 1.0 and later
912
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
913
* Mac OS X: in version 10.0 and later
915
procedure zvmul(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32; conjugate: SInt32); external name '_zvmul';
919
�������������������������������������������������������������������������������
922
Split Complex Dot product
924
Criteria to invoke PowerPC vector code:
925
1. input1.realp, input1.imagp, input2.realp, input2.imagp are all
931
If any of the above criteria are not satisfied, the PowerPC scalor code
932
implementation will be used.
933
�������������������������������������������������������������������������������
939
* Non-Carbon CFM: in vecLib 1.0 and later
940
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
941
* Mac OS X: in version 10.0 and later
943
procedure zdotpr(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; size: UInt32); external name '_zdotpr';
947
�������������������������������������������������������������������������������
950
Split Complex Inner Dot product
952
Criteria to invoke PowerPC vector code:
953
1. input1.realp, input1.imagp, input2.realp, input2.imagp must be
954
all relatively aligned.
959
If any of the above criteria are not satisfied, the PowerPC scalor code
960
implementation will be used.
961
�������������������������������������������������������������������������������
967
* Non-Carbon CFM: in vecLib 1.0 and later
968
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
969
* Mac OS X: in version 10.0 and later
971
procedure zidotpr(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; size: UInt32); external name '_zidotpr';
975
�������������������������������������������������������������������������������
978
Split Complex - Real Dot product
980
Criteria to invoke PowerPC vector code:
981
1. input1.realp, input1.imagp, input2 are must be relatively aligned.
986
If any of the above criteria are not satisfied, the PowerPC scalor code
987
implementation will be used.
988
�������������������������������������������������������������������������������
994
* Non-Carbon CFM: in vecLib 1.0 and later
995
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
996
* Mac OS X: in version 10.0 and later
998
procedure zrdotpr(var input1: DSPSplitComplex; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: DSPSplitComplex; size: UInt32); external name '_zrdotpr';
1002
�������������������������������������������������������������������������������
1005
Split Complex Conjugate Multiply And vadd
1007
Criteria to invoke PowerPC vector code:
1008
1. input1.realp, input1.imagp, input2.realp, input2.imagp,
1009
input_3.realp, input_3.imagp, result.realp, result.imagp
1010
must be all relatively aligned.
1017
If any of the above criteria are not satisfied, the PowerPC scalor code
1018
implementation will be used.
1019
�������������������������������������������������������������������������������
1025
* Non-Carbon CFM: in vecLib 1.0 and later
1026
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
1027
* Mac OS X: in version 10.0 and later
1029
procedure zvcma(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var input3: DSPSplitComplex; stride3: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zvcma';
1033
�������������������������������������������������������������������������������
1036
Split Complex - Real Add
1038
Criteria to invoke PowerPC vector code:
1039
1. input1.realp, input1.imagp, input2, result.realp, result.imagp
1040
are all relatively aligned.
1046
If any of the above criteria are not satisfied, the PowerPC scalor code
1047
implementation will be used.
1048
�������������������������������������������������������������������������������
1054
* Non-Carbon CFM: in vecLib 1.0 and later
1055
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
1056
* Mac OS X: in version 10.0 and later
1058
procedure zrvadd(var input1: DSPSplitComplex; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zrvadd';
1062
�������������������������������������������������������������������������������
1065
Split Complex - Real Substract
1067
Criteria to invoke PowerPC vector code:
1068
1. input1.realp, input1.imagp, input2, result.realp, result.imagp
1069
must be all relatively aligned.
1075
If any of the above criteria are not satisfied, the PowerPC scalor code
1076
implementation will be used.
1077
�������������������������������������������������������������������������������
1083
* Non-Carbon CFM: in vecLib 1.0 and later
1084
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
1085
* Mac OS X: in version 10.0 and later
1087
procedure zrvsub(var input1: DSPSplitComplex; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zrvsub';
1091
�������������������������������������������������������������������������������
1094
Split Complex - Real Multiply
1096
Criteria to invoke PowerPC vector code:
1097
1. input1.realp, input1.imagp, input2, result.realp, result.imagp
1098
must be all relatively aligned.
1104
If any of the above criteria are not satisfied, the PowerPC scalor code
1105
implementation will be used.
1106
�������������������������������������������������������������������������������
1112
* Non-Carbon CFM: in vecLib 1.0 and later
1113
* CarbonLib: not in Carbon, but vecLib is compatible with Carbon
1114
* Mac OS X: in version 10.0 and later
1116
procedure zrvmul(var input1: DSPSplitComplex; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zrvmul';
1119
{$ifc undefined USE_NONE_APPLE_STANDARD_DATATYPES}
1120
{$setc USE_NONE_APPLE_STANDARD_DATATYPES := 1}
1123
{$ifc USE_NONE_APPLE_STANDARD_DATATYPES}
1135
COMPLEX = DSPComplex;
1136
COMPLEXPtr = ^COMPLEX;
1137
COMPLEX_SPLIT = DSPSplitComplex;
1138
COMPLEX_SPLITPtr = ^COMPLEX_SPLIT;
1139
{$endc} {USE_NONE_APPLE_STANDARD_DATATYPES}