Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to use Altivec ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
spinner
n00b
n00b


Joined: 30 Sep 2005
Posts: 46

PostPosted: Tue Nov 01, 2005 3:23 pm    Post subject: How to use Altivec ? Reply with quote

I was reading some examples over the IBM site and I want to use some of the Altivec functions like vec_add with C.

Do I need any header files or something ?
To be more specific what header files or libraries do I need ?

Also does any of you has any link , listing all the Altivec functions and how to use them ?
I have found this: http://developer.apple.com/hardware/ve/instruction_crossref.html
Maybe a PDF or something for offline reading ?

I am working with GCC.
Back to top
View user's profile Send private message
haschka
n00b
n00b


Joined: 31 Jul 2003
Posts: 9

PostPosted: Wed Nov 02, 2005 12:22 pm    Post subject: Reply with quote

on an operating system other then MacOSX you need to

#include<altivec.h>

You can get a pdf file with discriptions of altivec intrinsics at freescale:

http://www.freescale.com/files/32bit/doc/ref_manual/ALTIVECPIM.pdf

to build programs you have to use the "-O2 -mabi=altivec" compilier flags.

Don't count me on that, I've only written altivec code on Mac OS X where you use can use -faltivec

I hope that helps
Back to top
View user's profile Send private message
spinner
n00b
n00b


Joined: 30 Sep 2005
Posts: 46

PostPosted: Wed Nov 02, 2005 4:02 pm    Post subject: Reply with quote

altivec.h comes with gcc , glibc or kernel headers ?

EDIT: well ti comes with gcc and glibc i think.
there is an altivec.h inside the kernel source but I haven't check if it is the same.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum