hughperkins / cltorch

An OpenCL backend for torch.
Other
289 stars 26 forks source link

uint not defined in THClGeneral.h on MacOS 10.11.6 #79

Closed lebedov closed 8 years ago

lebedov commented 8 years ago

When attempting to build PyClTorch on MacOS 10.11.6 with Apple llvm 7.3.0 against cltorch b578d9c, the compiler complained about uint at THClGeneral.h#L148 not being defined. Should there be a typedef unsigned int uint; in the preceding lines?

hughperkins commented 8 years ago

Interesting. Seems like that should be uint32, rather than simply uint. I cant really remember if htats intentional or not. Trying on Travis Mac OS X build, after changing to uint32, https://travis-ci.org/hughperkins/distro-cl/builds/159285525 Let's see what happens...

hughperkins commented 8 years ago

Build seems to have passed https://travis-ci.org/hughperkins/distro-cl/builds/159285525 . If you use branch tweak-int of distro-cl, (or perhaps of cltorch) to what extent does this build more completely?

lebedov commented 8 years ago

I would hazard a guess that you could use uint without a typedef on Linux because the stock compile options passed to gcc by distutils didn't force it to comply with whatever recent c++ spec that no longer defines it.

hughperkins commented 8 years ago

Alright. Can you confirm that the tweak-int branch works for you? If it does, I'll merge it to master.

lebedov commented 8 years ago

Yes - tweak-int fixes the problem with pycltorch.

hughperkins commented 8 years ago

Cool :-)