View previous topic :: View next topic |
Author |
Message |
kroe
Joined: 02 Apr 2007 Posts: 6
|
Posted: Wed Aug 15, 2007 2:10 pm Post subject: Share header for DMA? |
|
|
I am using SPE initiated DMA to pull across arguments. I have a structure that holds my arguments. DMA works fine with the identical struct defined in both the SPE and PPE code, but the redundancy bothers me.
Is there a simple way (must be) to have a single header file and use it in my SPE and PPE code?
I have two projects: PPE and SPE. Where would I put the header file containing my struct and what would the includes be on the SPE and PPE sides?
Thanks,
-Ken |
|
Back to top |
|
|
IronPeter
Joined: 06 Aug 2007 Posts: 207
|
|
Back to top |
|
|
ldesnogu
Joined: 17 Apr 2004 Posts: 95
|
Posted: Wed Aug 15, 2007 8:38 pm Post subject: |
|
|
Follow what IronPeter said, but keep in mind one thing: your SPU compiler may compile for a 32 bit (SPU) target while your PPU compiler may compile for a 64 bit (PPU) target.
The result is that struct layout will be different.
To solve that pass -m32 to your PPU compiler. _________________ Laurent |
|
Back to top |
|
|
|