fjarri / reikna

Pure Python GPGPU library
http://reikna.publicfields.net/
MIT License
164 stars 16 forks source link

INLINE redefined by kernel with Intel (beignet) #23

Closed hgomersall closed 9 years ago

hgomersall commented 9 years ago

The generated source includes the preprocessor directive #define INLINE inline. It seems that with Intel beignet (on Ubuntu 15.04), the INLINE macro is already defined, returning the warning (something like):

/tmp/widEMp.cl:19:13: warning: 'INLINE' macro redefined

The original definition of INLINE is as inline __attribute__((always_inline)), which seems reasonable. Does it make sense to protect the INLINE definition inside an #if !define(INLINE)?

hgomersall commented 9 years ago

Of course, this is set inside reikna/cluda/kernel.mako.

hgomersall commented 9 years ago

This is defined inside beignet/include/ocl_types.h in the beignet tree. Is Beignet the only system that defines that macro?

fjarri commented 9 years ago

Is Beignet the only system that defines that macro?

I think so, I've never had any problems before. Could you check the header files and see what is INLINE resolved to? If it's the same as what Reikna defines (inline), I'll just add an ifndef.

hgomersall commented 9 years ago

It resolves to inline __attribute__((always_inline)), as in ocl_types.h.

hgomersall commented 9 years ago

Thanks Bogdan.