[Cbe-oss-dev] libspe ada binding README
Sa Liu
SALIU at de.ibm.com
Thu Jul 5 21:55:06 EST 2007
The following is a short description for the usage of Ada binding package
files:
Usage of Ada binding package files
There are three Ada binding package files under this directory:
cbea_map.ads, libspe2_types.ads and libspe2.ads. The cbea_map.ads and
libspe2_types.ads declare data types, data structures and constants used
in libspe2 API. The libspe.ads defines all interfaces of libspe functions
using Ada pragmas.
To include the package files in Ada source file:
with cbea_map.ads;
with libspe_types.ads;
with libspe.ads;
Further more to have full visibility of the data and interfaces:
use cbea_map.ads;
use libspe_types.ads;
use libspe.ads
The Ada binding package files are installed under /usr/adainclude in SDK
3.0.
You need to set this directory in your source path so that the compiler
could find the packages.
For instance in your GNAT project file hello.gpr:
Project hello is
for Source_Dirs use("/usr/adainclude/", ".");
end hello;
When compiling the Ada source program, add a GNAT option -Phello.gpr.
Finally to link the program with libspe dynamic library, add linker option
-lspe2.
e.g.
ppu-gnatmake helloworld.adb -Phello.gpr -largs -lspe2
Mit freundlichen Grüßen / Best Regards
Sa Liu, GCC on Cell/B.E. Development, LTC
Phone: (+49) 7031 163104
-----------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Johann Weihen | Geschäftsführung: Herbert
Kircher
Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht Stuttgart,
HRB 243294
More information about the cbe-oss-dev
mailing list