• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[OT] Altivec
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OT] Altivec


  • Subject: [OT] Altivec
  • From: "Mark's Studio" <email@hidden>
  • Date: Fri, 4 Jul 2003 12:43:29 +0200

Sorry if this is a bit off.

Im trying to optimize some code using altivec.

First is NSLog not supposed to print out vectors with the %vd format?

Here is the problem

peakBuffer is a const void * [NSData mutableBytes]
vSInt8 lmin,lmax is from the vec_min(),vec_max()

*(vSInt8 *)peakBuffer = lmin; NSLog(@"%d",*(SInt8
*)peakBuffer); peakBuffer+= 1;
*(vSInt8 *)peakBuffer = rmin; NSLog(@"%d",*(SInt8
*)peakBuffer); peakBuffer+= 1;
*(vSInt8 *)peakBuffer = lmax; NSLog(@"%d",*(SInt8
*)peakBuffer); peakBuffer+= 1;
*(vSInt8 *)peakBuffer = rmax; NSLog(@"%d",*(SInt8
*)peakBuffer); peakBuffer+= 1;


// this is just to check what was stored
peakBuffer-= 4;
SInt8 t1,t2,t3,t4;
t1 = *(SInt8 *)peakBuffer; peakBuffer+= 1;
t2 = *(SInt8 *)peakBuffer; peakBuffer+= 1;
t3 = *(SInt8 *)peakBuffer; peakBuffer+= 1;
t4 = *(SInt8 *)peakBuffer; peakBuffer+= 1;

NSLog(@"%d %d %d %d",t1,t2,t3,t4);

Here is a bit of the output, the original value is right, but why is
the check not the same ?



2003-07-04 12:22:05.255 PMCoreAudioTest[675] 0
2003-07-04 12:22:05.258 PMCoreAudioTest[675] 0
2003-07-04 12:22:05.260 PMCoreAudioTest[675] 0
2003-07-04 12:22:05.263 PMCoreAudioTest[675] 0
2003-07-04 12:22:05.266 PMCoreAudioTest[675] 0 0 0 0
2003-07-04 12:22:05.269 PMCoreAudioTest[675] -1
2003-07-04 12:22:05.272 PMCoreAudioTest[675] 0
2003-07-04 12:22:05.275 PMCoreAudioTest[675] 0
2003-07-04 12:22:05.278 PMCoreAudioTest[675] 0
2003-07-04 12:22:05.280 PMCoreAudioTest[675] 1 1 0 0
2003-07-04 12:22:05.283 PMCoreAudioTest[675] -2
2003-07-04 12:22:05.286 PMCoreAudioTest[675] -2
2003-07-04 12:22:05.289 PMCoreAudioTest[675] 3
2003-07-04 12:22:05.292 PMCoreAudioTest[675] 3
2003-07-04 12:22:05.305 PMCoreAudioTest[675] 4 4 3 3
2003-07-04 12:22:05.306 PMCoreAudioTest[675] -12
2003-07-04 12:22:05.306 PMCoreAudioTest[675] -12
2003-07-04 12:22:05.306 PMCoreAudioTest[675] 9
2003-07-04 12:22:05.306 PMCoreAudioTest[675] 8
2003-07-04 12:22:05.307 PMCoreAudioTest[675] 8 8 9 8
2003-07-04 12:22:05.307 PMCoreAudioTest[675] -3
2003-07-04 12:22:05.307 PMCoreAudioTest[675] -2
2003-07-04 12:22:05.307 PMCoreAudioTest[675] 3
2003-07-04 12:22:05.307 PMCoreAudioTest[675] 2
2003-07-04 12:22:05.308 PMCoreAudioTest[675] 3 3 3 2

Is SInt8 and vSInt8 not the same size?


PS im running the NDA.

Peter Mark

Mark's Recording Studio A/S
Lundeskovsvej 3 2900 Hellerup
Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: [OT] Altivec
      • From: David Duncan <email@hidden>
  • Prev by Date: Fw: GetSharedLibrary
  • Next by Date: Re: How should I do the sequencer thread on OS X?
  • Previous by thread: Re: Fw: GetSharedLibrary
  • Next by thread: Re: [OT] Altivec
  • Index(es):
    • Date
    • Thread