Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

987 lines
27 KiB

  1. /*
  2. File: vBasicOps.h
  3. Contains: Basic Algebraic Operations for AltiVec
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __VBASICOPS__
  11. #define __VBASICOPS__
  12. #ifndef __CONDITIONALMACROS__
  13. #include <ConditionalMacros.h>
  14. #endif
  15. #if PRAGMA_ONCE
  16. #pragma once
  17. #endif
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #if PRAGMA_IMPORT
  22. #pragma import on
  23. #endif
  24. #if PRAGMA_STRUCT_ALIGN
  25. #pragma options align=mac68k
  26. #elif PRAGMA_STRUCT_PACKPUSH
  27. #pragma pack(push, 2)
  28. #elif PRAGMA_STRUCT_PACK
  29. #pragma pack(2)
  30. #endif
  31. #ifdef __VEC__
  32. /*
  33. This section is a collection of algebraic functions that uses the AltiVec
  34. instruction set, and is designed to facilitate vector processing in
  35. mathematical programming. Following table indicates which functions are covered
  36. by AltiVec instruction set and which ones are performed by vBasicOps library:
  37. Legend:
  38. H/W = Hardware
  39. LIB = vBasicOps Library
  40. NRel = Next Release of vBasicOps Library
  41. N/A = Not Applicable
  42. +---------------+-----+-----+-----+-----+-----+-----+-----+-----+------+------+
  43. | Data Type/ | U8 | S8 | U16 | S16 | U32 | S32 | U64 | S64 | U128 | S128 |
  44. | Function | | | | | | | | | | |
  45. +---------------+-----+-----+-----+-----+-----+-----+-----+-----+------+------+
  46. | Add | H/W | H/W | H/W | H/W | H/W | H/W | LIB | LIB | LIB | LIB |
  47. +---------------+-----+-----+-----+-----+-----+-----+-----+-----+------+------+
  48. | AddS | H/W | H/W | H/W | H/W | H/W | H/W | LIB | LIB | LIB | LIB |
  49. +---------------+-----+-----+-----+-----+-----+-----+-----+-----+------+------+
  50. | Sub | H/W | H/W | H/W | H/W | H/W | H/W | LIB | LIB | LIB | LIB |
  51. +---------------+-----+-----+-----+-----+-----+-----+-----+-----+------+------+
  52. | SubS | H/W | H/W | H/W | H/W | H/W | H/W | LIB | LIB | LIB | LIB |
  53. +---------------+-----+-----+-----+-----+-----+-----+-----+-----+------+------+
  54. | Mul(Half) | LIB | LIB | LIB | LIB | LIB | LIB | LIB | LIB | LIB | LIB |
  55. +---------------+-----+-----+-----+-----+-----+-----+-----+-----+------+------+
  56. |Mul Even (Full)| H/W | H/W | H/W | H/W | LIB | LIB | LIB | LIB | N/A | N/A |
  57. +---------------+-----+-----+-----+-----+-----+-----+-----+-----+------+------+
  58. |Mul Odd (Full)| H/W | H/W | H/W | H/W | LIB | LIB | LIB | LIB | N/A | N/A |
  59. +---------------+-----+-----+-----+-----+-----+-----+-----+-----+------+------+
  60. | Divide | LIB | LIB | LIB | LIB | LIB | LIB | LIB |NRel | LIB | LIB |
  61. +---------------+-----+-----+-----+-----+-----+-----+-----+-----+------+------+
  62. | Shift | H/W | H/W | H/W | H/W | H/W | H/W | LIB | LIB | LIB | LIB |
  63. +---------------+-----+-----+-----+-----+-----+-----+-----+-----+------+------+
  64. | Rotate | H/W | H/W | H/W | H/W | H/W | H/W | LIB | LIB | LIB | LIB |
  65. +---------------+-----+-----+-----+-----+-----+-----+-----+-----+------+------+
  66. Following is a short description of functions in this section:
  67. Add: It takes two vectors of data elements and adds each element
  68. of the second vector to the corresponding element of the first
  69. vector and puts the result in the associated data element of the
  70. destination register.
  71. Subtract: It takes two vectors of data elements and subtracts each element
  72. of the second vector from the corresponding element of the first
  73. vector and puts the result in the associated data element of the
  74. destination register.
  75. Multiply: It takes two vectors of data elements and multiplies each element
  76. of the first vector by the corresponding element of the second
  77. vector and puts the result in the associated data element of the
  78. destination register.
  79. Divide: It takes two vectors of data elements and divides each element
  80. of the first vector by the corresponding element of the second
  81. vector and puts the result in the associated data element of the
  82. destination register. A pointer is passed to the function to get
  83. the remainder.
  84. Shift: It takes a vector of two 64-bit data elements or one 128-bit
  85. data element and shifts it to right or left, in a logical or
  86. algebraic manner, using a shift factor that is passed as an
  87. arguement to the function.
  88. Rotate: It takes a vector of two 64-bit data elements or one 128-bit
  89. data element and rotates it to right or left, using a shift
  90. factor that is passed as an arguement to the function.
  91. Following abbreviations are used in the names of functions in this section:
  92. v Vector
  93. U Unsigned
  94. S Signed
  95. 8 8-bit
  96. 16 16-bit
  97. 32 32-bit
  98. 64 64-bit
  99. 128 128-bit
  100. Add Addition
  101. AddS Addition with Saturation
  102. Sub Subtraction
  103. SubS Subtraction with Saturation
  104. Mul Multiplication
  105. Divide Division
  106. Half Half (multiplication, width of result is the same as width of
  107. operands)
  108. Full Full (multiplication, width of result is twice width of each
  109. operand)
  110. Even Multiplication is performed on EVEN data elements of vector
  111. (Please note that Big endian is used. So the left-most
  112. data element is labled as element 0)
  113. Odd Multiplication is performed on ODD data elements of vector.
  114. A Algebraic
  115. LL Logical Left
  116. LR Logical Right
  117. Shift Shift by one factor
  118. Shift2 Shift by two factors( only apply to 64 bit operation )
  119. Rotate Rotate by one factor
  120. Rotate2 Rotate by two factors( only apply to 64 bit operation )
  121. */
  122. /*
  123. * vU8Divide()
  124. *
  125. * Availability:
  126. * Non-Carbon CFM: in vecLib 1.0 and later
  127. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  128. * Mac OS X: in version 10.0 and later
  129. */
  130. EXTERN_API_C( vector unsigned char )
  131. vU8Divide(
  132. vector unsigned char vN,
  133. vector unsigned char vD,
  134. vector unsigned char * vRemainder);
  135. /*
  136. * vS8Divide()
  137. *
  138. * Availability:
  139. * Non-Carbon CFM: in vecLib 1.0 and later
  140. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  141. * Mac OS X: in version 10.0 and later
  142. */
  143. EXTERN_API_C( vector signed char )
  144. vS8Divide(
  145. vector signed char vN,
  146. vector signed char vD,
  147. vector signed char * vRemainder);
  148. /*
  149. * vU16Divide()
  150. *
  151. * Availability:
  152. * Non-Carbon CFM: in vecLib 1.0 and later
  153. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  154. * Mac OS X: in version 10.0 and later
  155. */
  156. EXTERN_API_C( vector unsigned short )
  157. vU16Divide(
  158. vector unsigned short vN,
  159. vector unsigned short vD,
  160. vector unsigned short * vRemainder);
  161. /*
  162. * vS16Divide()
  163. *
  164. * Availability:
  165. * Non-Carbon CFM: in vecLib 1.0 and later
  166. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  167. * Mac OS X: in version 10.0 and later
  168. */
  169. EXTERN_API_C( vector signed short )
  170. vS16Divide(
  171. vector signed short vN,
  172. vector signed short vD,
  173. vector signed short * vRemainder);
  174. /*
  175. * vU32Divide()
  176. *
  177. * Availability:
  178. * Non-Carbon CFM: in vecLib 1.0 and later
  179. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  180. * Mac OS X: in version 10.0 and later
  181. */
  182. EXTERN_API_C( vector unsigned int )
  183. vU32Divide(
  184. vector unsigned int vN,
  185. vector unsigned int vD,
  186. vector unsigned int * vRemainder);
  187. /*
  188. * vS32Divide()
  189. *
  190. * Availability:
  191. * Non-Carbon CFM: in vecLib 1.0 and later
  192. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  193. * Mac OS X: in version 10.0 and later
  194. */
  195. EXTERN_API_C( vector signed int )
  196. vS32Divide(
  197. vector signed int vN,
  198. vector signed int vD,
  199. vector signed int * vRemainder);
  200. /*
  201. * vU64Divide()
  202. *
  203. * Availability:
  204. * Non-Carbon CFM: in vecLib 1.0 and later
  205. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  206. * Mac OS X: in version 10.0 and later
  207. */
  208. EXTERN_API_C( vector unsigned int )
  209. vU64Divide(
  210. vector unsigned int vN,
  211. vector unsigned int vD,
  212. vector unsigned int * vRemainder);
  213. /*
  214. * vS64Divide()
  215. *
  216. * Availability:
  217. * Non-Carbon CFM: in vecLib 1.0 and later
  218. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  219. * Mac OS X: in version 10.0 and later
  220. */
  221. EXTERN_API_C( vector signed int )
  222. vS64Divide(
  223. vector signed int vN,
  224. vector signed int vD,
  225. vector signed int * vRemainder);
  226. /*
  227. * vU128Divide()
  228. *
  229. * Availability:
  230. * Non-Carbon CFM: in vecLib 1.0 and later
  231. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  232. * Mac OS X: in version 10.0 and later
  233. */
  234. EXTERN_API_C( vector unsigned int )
  235. vU128Divide(
  236. vector unsigned int vN,
  237. vector unsigned int vD,
  238. vector unsigned int * vRemainder);
  239. /*
  240. * vS128Divide()
  241. *
  242. * Availability:
  243. * Non-Carbon CFM: in vecLib 1.0 and later
  244. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  245. * Mac OS X: in version 10.0 and later
  246. */
  247. EXTERN_API_C( vector signed int )
  248. vS128Divide(
  249. vector signed int vN,
  250. vector signed int vD,
  251. vector signed int * vRemainder);
  252. /*
  253. * vU8HalfMultiply()
  254. *
  255. * Availability:
  256. * Non-Carbon CFM: in vecLib 1.0 and later
  257. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  258. * Mac OS X: in version 10.0 and later
  259. */
  260. EXTERN_API_C( vector unsigned char )
  261. vU8HalfMultiply(
  262. vector unsigned char vA,
  263. vector unsigned char vB);
  264. /*
  265. * vS8HalfMultiply()
  266. *
  267. * Availability:
  268. * Non-Carbon CFM: in vecLib 1.0 and later
  269. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  270. * Mac OS X: in version 10.0 and later
  271. */
  272. EXTERN_API_C( vector signed char )
  273. vS8HalfMultiply(
  274. vector signed char vA,
  275. vector signed char vB);
  276. /*
  277. * vU16HalfMultiply()
  278. *
  279. * Availability:
  280. * Non-Carbon CFM: in vecLib 1.0 and later
  281. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  282. * Mac OS X: in version 10.0 and later
  283. */
  284. EXTERN_API_C( vector unsigned short )
  285. vU16HalfMultiply(
  286. vector unsigned short vA,
  287. vector unsigned short vB);
  288. /*
  289. * vS16HalfMultiply()
  290. *
  291. * Availability:
  292. * Non-Carbon CFM: in vecLib 1.0 and later
  293. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  294. * Mac OS X: in version 10.0 and later
  295. */
  296. EXTERN_API_C( vector signed short )
  297. vS16HalfMultiply(
  298. vector signed short vA,
  299. vector signed short vB);
  300. /*
  301. * vU32HalfMultiply()
  302. *
  303. * Availability:
  304. * Non-Carbon CFM: in vecLib 1.0 and later
  305. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  306. * Mac OS X: in version 10.0 and later
  307. */
  308. EXTERN_API_C( vector unsigned int )
  309. vU32HalfMultiply(
  310. vector unsigned int vA,
  311. vector unsigned int vB);
  312. /*
  313. * vS32HalfMultiply()
  314. *
  315. * Availability:
  316. * Non-Carbon CFM: in vecLib 1.0 and later
  317. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  318. * Mac OS X: in version 10.0 and later
  319. */
  320. EXTERN_API_C( vector signed int )
  321. vS32HalfMultiply(
  322. vector signed int vA,
  323. vector signed int vB);
  324. /*
  325. * vU32FullMulEven()
  326. *
  327. * Availability:
  328. * Non-Carbon CFM: in vecLib 1.0 and later
  329. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  330. * Mac OS X: in version 10.0 and later
  331. */
  332. EXTERN_API_C( vector unsigned int )
  333. vU32FullMulEven(
  334. vector unsigned int vA,
  335. vector unsigned int vB);
  336. /*
  337. * vU32FullMulOdd()
  338. *
  339. * Availability:
  340. * Non-Carbon CFM: in vecLib 1.0 and later
  341. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  342. * Mac OS X: in version 10.0 and later
  343. */
  344. EXTERN_API_C( vector unsigned int )
  345. vU32FullMulOdd(
  346. vector unsigned int vA,
  347. vector unsigned int vB);
  348. /*
  349. * vS32FullMulEven()
  350. *
  351. * Availability:
  352. * Non-Carbon CFM: in vecLib 1.0 and later
  353. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  354. * Mac OS X: in version 10.0 and later
  355. */
  356. EXTERN_API_C( vector signed int )
  357. vS32FullMulEven(
  358. vector signed int vA,
  359. vector signed int vB);
  360. /*
  361. * vS32FullMulOdd()
  362. *
  363. * Availability:
  364. * Non-Carbon CFM: in vecLib 1.0 and later
  365. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  366. * Mac OS X: in version 10.0 and later
  367. */
  368. EXTERN_API_C( vector signed int )
  369. vS32FullMulOdd(
  370. vector signed int vA,
  371. vector signed int vB);
  372. /*
  373. * vU64FullMulEven()
  374. *
  375. * Availability:
  376. * Non-Carbon CFM: in vecLib 1.0 and later
  377. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  378. * Mac OS X: in version 10.0 and later
  379. */
  380. EXTERN_API_C( vector unsigned int )
  381. vU64FullMulEven(
  382. vector unsigned int vA,
  383. vector unsigned int vB);
  384. /*
  385. * vU64FullMulOdd()
  386. *
  387. * Availability:
  388. * Non-Carbon CFM: in vecLib 1.0 and later
  389. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  390. * Mac OS X: in version 10.0 and later
  391. */
  392. EXTERN_API_C( vector unsigned int )
  393. vU64FullMulOdd(
  394. vector unsigned int vA,
  395. vector unsigned int vB);
  396. /*
  397. * vU64HalfMultiply()
  398. *
  399. * Availability:
  400. * Non-Carbon CFM: in vecLib 1.0 and later
  401. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  402. * Mac OS X: in version 10.0 and later
  403. */
  404. EXTERN_API_C( vector unsigned int )
  405. vU64HalfMultiply(
  406. vector unsigned int vA,
  407. vector unsigned int vB);
  408. /*
  409. * vS64HalfMultiply()
  410. *
  411. * Availability:
  412. * Non-Carbon CFM: in vecLib 1.0 and later
  413. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  414. * Mac OS X: in version 10.0 and later
  415. */
  416. EXTERN_API_C( vector signed int )
  417. vS64HalfMultiply(
  418. vector signed int vA,
  419. vector signed int vB);
  420. /*
  421. * vS64FullMulEven()
  422. *
  423. * Availability:
  424. * Non-Carbon CFM: in vecLib 1.0 and later
  425. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  426. * Mac OS X: in version 10.0 and later
  427. */
  428. EXTERN_API_C( vector signed int )
  429. vS64FullMulEven(
  430. vector signed int vA,
  431. vector signed int vB);
  432. /*
  433. * vS64FullMulOdd()
  434. *
  435. * Availability:
  436. * Non-Carbon CFM: in vecLib 1.0 and later
  437. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  438. * Mac OS X: in version 10.0 and later
  439. */
  440. EXTERN_API_C( vector signed int )
  441. vS64FullMulOdd(
  442. vector signed int vA,
  443. vector signed int vB);
  444. /*
  445. * vU128HalfMultiply()
  446. *
  447. * Availability:
  448. * Non-Carbon CFM: in vecLib 1.0 and later
  449. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  450. * Mac OS X: in version 10.0 and later
  451. */
  452. EXTERN_API_C( vector unsigned int )
  453. vU128HalfMultiply(
  454. vector unsigned int vA,
  455. vector unsigned int vB);
  456. /*
  457. * vS128HalfMultiply()
  458. *
  459. * Availability:
  460. * Non-Carbon CFM: in vecLib 1.0 and later
  461. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  462. * Mac OS X: in version 10.0 and later
  463. */
  464. EXTERN_API_C( vector signed int )
  465. vS128HalfMultiply(
  466. vector signed int vA,
  467. vector signed int vB);
  468. /*
  469. * vU64Sub()
  470. *
  471. * Availability:
  472. * Non-Carbon CFM: in vecLib 1.0 and later
  473. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  474. * Mac OS X: in version 10.0 and later
  475. */
  476. EXTERN_API_C( vector unsigned int )
  477. vU64Sub(
  478. vector unsigned int vA,
  479. vector unsigned int vB);
  480. /*
  481. * vU64SubS()
  482. *
  483. * Availability:
  484. * Non-Carbon CFM: in vecLib 1.0 and later
  485. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  486. * Mac OS X: in version 10.0 and later
  487. */
  488. EXTERN_API_C( vector unsigned int )
  489. vU64SubS(
  490. vector unsigned int vA,
  491. vector unsigned int vB);
  492. /*
  493. * vU128Sub()
  494. *
  495. * Availability:
  496. * Non-Carbon CFM: in vecLib 1.0 and later
  497. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  498. * Mac OS X: in version 10.0 and later
  499. */
  500. EXTERN_API_C( vector unsigned int )
  501. vU128Sub(
  502. vector unsigned int vA,
  503. vector unsigned int vB);
  504. /*
  505. * vU128SubS()
  506. *
  507. * Availability:
  508. * Non-Carbon CFM: in vecLib 1.0 and later
  509. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  510. * Mac OS X: in version 10.0 and later
  511. */
  512. EXTERN_API_C( vector unsigned int )
  513. vU128SubS(
  514. vector unsigned int vA,
  515. vector unsigned int vB);
  516. /*
  517. * vS64Sub()
  518. *
  519. * Availability:
  520. * Non-Carbon CFM: in vecLib 1.0 and later
  521. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  522. * Mac OS X: in version 10.0 and later
  523. */
  524. EXTERN_API_C( vector signed int )
  525. vS64Sub(
  526. vector signed int vA,
  527. vector signed int vB);
  528. /*
  529. * vS128Sub()
  530. *
  531. * Availability:
  532. * Non-Carbon CFM: in vecLib 1.0 and later
  533. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  534. * Mac OS X: in version 10.0 and later
  535. */
  536. EXTERN_API_C( vector signed int )
  537. vS128Sub(
  538. vector signed int vA,
  539. vector signed int vB);
  540. /*
  541. * vS64SubS()
  542. *
  543. * Availability:
  544. * Non-Carbon CFM: in vecLib 1.0 and later
  545. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  546. * Mac OS X: in version 10.0 and later
  547. */
  548. EXTERN_API_C( vector signed int )
  549. vS64SubS(
  550. vector signed int vA,
  551. vector signed int vB);
  552. /*
  553. * vS128SubS()
  554. *
  555. * Availability:
  556. * Non-Carbon CFM: in vecLib 1.0 and later
  557. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  558. * Mac OS X: in version 10.0 and later
  559. */
  560. EXTERN_API_C( vector signed int )
  561. vS128SubS(
  562. vector signed int vA,
  563. vector signed int vB);
  564. /*
  565. * vU64Add()
  566. *
  567. * Availability:
  568. * Non-Carbon CFM: in vecLib 1.0 and later
  569. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  570. * Mac OS X: in version 10.0 and later
  571. */
  572. EXTERN_API_C( vector unsigned int )
  573. vU64Add(
  574. vector unsigned int vA,
  575. vector unsigned int vB);
  576. /*
  577. * vU64AddS()
  578. *
  579. * Availability:
  580. * Non-Carbon CFM: in vecLib 1.0 and later
  581. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  582. * Mac OS X: in version 10.0 and later
  583. */
  584. EXTERN_API_C( vector unsigned int )
  585. vU64AddS(
  586. vector unsigned int vA,
  587. vector unsigned int vB);
  588. /*
  589. * vU128Add()
  590. *
  591. * Availability:
  592. * Non-Carbon CFM: in vecLib 1.0 and later
  593. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  594. * Mac OS X: in version 10.0 and later
  595. */
  596. EXTERN_API_C( vector unsigned int )
  597. vU128Add(
  598. vector unsigned int vA,
  599. vector unsigned int vB);
  600. /*
  601. * vU128AddS()
  602. *
  603. * Availability:
  604. * Non-Carbon CFM: in vecLib 1.0 and later
  605. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  606. * Mac OS X: in version 10.0 and later
  607. */
  608. EXTERN_API_C( vector unsigned int )
  609. vU128AddS(
  610. vector unsigned int vA,
  611. vector unsigned int vB);
  612. /*
  613. * vS64Add()
  614. *
  615. * Availability:
  616. * Non-Carbon CFM: in vecLib 1.0 and later
  617. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  618. * Mac OS X: in version 10.0 and later
  619. */
  620. EXTERN_API_C( vector signed int )
  621. vS64Add(
  622. vector signed int vA,
  623. vector signed int vB);
  624. /*
  625. * vS64AddS()
  626. *
  627. * Availability:
  628. * Non-Carbon CFM: in vecLib 1.0 and later
  629. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  630. * Mac OS X: in version 10.0 and later
  631. */
  632. EXTERN_API_C( vector signed int )
  633. vS64AddS(
  634. vector signed int vA,
  635. vector signed int vB);
  636. /*
  637. * vS128Add()
  638. *
  639. * Availability:
  640. * Non-Carbon CFM: in vecLib 1.0 and later
  641. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  642. * Mac OS X: in version 10.0 and later
  643. */
  644. EXTERN_API_C( vector signed int )
  645. vS128Add(
  646. vector signed int vA,
  647. vector signed int vB);
  648. /*
  649. * vS128AddS()
  650. *
  651. * Availability:
  652. * Non-Carbon CFM: in vecLib 1.0 and later
  653. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  654. * Mac OS X: in version 10.0 and later
  655. */
  656. EXTERN_API_C( vector signed int )
  657. vS128AddS(
  658. vector signed int vA,
  659. vector signed int vB);
  660. /*
  661. * vLL64Shift()
  662. *
  663. * Availability:
  664. * Non-Carbon CFM: in vecLib 1.0 and later
  665. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  666. * Mac OS X: in version 10.0 and later
  667. */
  668. EXTERN_API_C( vector unsigned int )
  669. vLL64Shift(
  670. vector unsigned int vA,
  671. vector unsigned char vShiftFactor);
  672. /*
  673. * vA64Shift()
  674. *
  675. * Availability:
  676. * Non-Carbon CFM: in vecLib 1.0 and later
  677. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  678. * Mac OS X: in version 10.0 and later
  679. */
  680. EXTERN_API_C( vector unsigned int )
  681. vA64Shift(
  682. vector unsigned int vA,
  683. vector unsigned char vShiftFactor);
  684. /*
  685. * vLR64Shift()
  686. *
  687. * Availability:
  688. * Non-Carbon CFM: in vecLib 1.0 and later
  689. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  690. * Mac OS X: in version 10.0 and later
  691. */
  692. EXTERN_API_C( vector unsigned int )
  693. vLR64Shift(
  694. vector unsigned int vA,
  695. vector unsigned char vShiftFactor);
  696. /*
  697. * vLL64Shift2()
  698. *
  699. * Availability:
  700. * Non-Carbon CFM: in vecLib 1.0 and later
  701. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  702. * Mac OS X: in version 10.0 and later
  703. */
  704. EXTERN_API_C( vector unsigned int )
  705. vLL64Shift2(
  706. vector unsigned int vA,
  707. vector unsigned char vShiftFactor);
  708. /*
  709. * vA64Shift2()
  710. *
  711. * Availability:
  712. * Non-Carbon CFM: in vecLib 1.0 and later
  713. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  714. * Mac OS X: in version 10.0 and later
  715. */
  716. EXTERN_API_C( vector unsigned int )
  717. vA64Shift2(
  718. vector unsigned int vA,
  719. vector unsigned char vShiftFactor);
  720. /*
  721. * vLR64Shift2()
  722. *
  723. * Availability:
  724. * Non-Carbon CFM: in vecLib 1.0 and later
  725. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  726. * Mac OS X: in version 10.0 and later
  727. */
  728. EXTERN_API_C( vector unsigned int )
  729. vLR64Shift2(
  730. vector unsigned int vA,
  731. vector unsigned char vShiftFactor);
  732. /*
  733. * vA128Shift()
  734. *
  735. * Availability:
  736. * Non-Carbon CFM: in vecLib 1.0 and later
  737. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  738. * Mac OS X: in version 10.0 and later
  739. */
  740. EXTERN_API_C( vector unsigned int )
  741. vA128Shift(
  742. vector unsigned int vA,
  743. vector unsigned char vShiftFactor);
  744. /*
  745. * vL64Rotate()
  746. *
  747. * Availability:
  748. * Non-Carbon CFM: in vecLib 1.0 and later
  749. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  750. * Mac OS X: in version 10.0 and later
  751. */
  752. EXTERN_API_C( vector unsigned int )
  753. vL64Rotate(
  754. vector unsigned int vA,
  755. vector unsigned char vRotateFactor);
  756. /*
  757. * vR64Rotate()
  758. *
  759. * Availability:
  760. * Non-Carbon CFM: in vecLib 1.0 and later
  761. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  762. * Mac OS X: in version 10.0 and later
  763. */
  764. EXTERN_API_C( vector unsigned int )
  765. vR64Rotate(
  766. vector unsigned int vA,
  767. vector unsigned char vRotateFactor);
  768. /*
  769. * vL64Rotate2()
  770. *
  771. * Availability:
  772. * Non-Carbon CFM: in vecLib 1.0 and later
  773. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  774. * Mac OS X: in version 10.0 and later
  775. */
  776. EXTERN_API_C( vector unsigned int )
  777. vL64Rotate2(
  778. vector unsigned int vA,
  779. vector unsigned char vRotateFactor);
  780. /*
  781. * vR64Rotate2()
  782. *
  783. * Availability:
  784. * Non-Carbon CFM: in vecLib 1.0 and later
  785. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  786. * Mac OS X: in version 10.0 and later
  787. */
  788. EXTERN_API_C( vector unsigned int )
  789. vR64Rotate2(
  790. vector unsigned int vA,
  791. vector unsigned char vRotateFactor);
  792. /*
  793. * vL128Rotate()
  794. *
  795. * Availability:
  796. * Non-Carbon CFM: in vecLib 1.0 and later
  797. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  798. * Mac OS X: in version 10.0 and later
  799. */
  800. EXTERN_API_C( vector unsigned int )
  801. vL128Rotate(
  802. vector unsigned int vA,
  803. vector unsigned char vRotateFactor);
  804. /*
  805. * vR128Rotate()
  806. *
  807. * Availability:
  808. * Non-Carbon CFM: in vecLib 1.0 and later
  809. * CarbonLib: not in Carbon, but vecLib is compatible with CarbonLib
  810. * Mac OS X: in version 10.0 and later
  811. */
  812. EXTERN_API_C( vector unsigned int )
  813. vR128Rotate(
  814. vector unsigned int vA,
  815. vector unsigned char vRotateFactor);
  816. #endif /* defined(__VEC__) */
  817. #if PRAGMA_STRUCT_ALIGN
  818. #pragma options align=reset
  819. #elif PRAGMA_STRUCT_PACKPUSH
  820. #pragma pack(pop)
  821. #elif PRAGMA_STRUCT_PACK
  822. #pragma pack()
  823. #endif
  824. #ifdef PRAGMA_IMPORT_OFF
  825. #pragma import off
  826. #elif PRAGMA_IMPORT
  827. #pragma import reset
  828. #endif
  829. #ifdef __cplusplus
  830. }
  831. #endif
  832. #endif /* __VBASICOPS__ */