Need of clang++ support and the exp function
Dahua Lin
[please enable javascript to see the address]
Sat May 26 18:40:42 CEST 2012
Hi,
Recently, I came across Vc, which I feel is a great library for me to use to improve the efficiency of some machine learning codes (without sacrificing the portability).
However, two issues post big obstacles for me:
1. No support of clang++. (clang is becoming the major compiler for Mac OS Platform, as Apple stops upgrading gcc due to license issues)
This doesn't seem to be a tough job. My current workaround is to make a minor modification to global.h as
#ifdef __INTEL_COMPILER
#define VC_ICC 1
#elif defined(__OPENCC__)
#define VC_OPEN64 1
#elif defined(__clang__)
#define VC_CLANG 1 # adding the support of CLANG
#elif defined(__GNUC__)
#define VC_GCC (__GNUC__ * 0x10000 + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
#elif defined(_MSC_VER)
#define VC_MSVC 1
#else
#define VC_UNSUPPORTED_COMPILER 1
#endif
Since _GNUC_ is also defined with clang, I put VC_CLANG above it. This seems working fine for some simple programs that I use for testing purpose. However, I would be great to see "official" support of this.
2. Lacking the exp function. I saw it supports plenty of other less-widely-used functions (e.g. atan, etc), but I just checked --- no exp.
For a lot of codes in probability modeling, inference, and sampling --- exp is a must, as it involves in nearly every probability distribution. Also, I don't think it is very difficult to implement (refer to cephes).
I really wish these two issues can be fixed soon. I actually seriously consider using it in our code bases.
- Dahua
--
Dahua Lin
[please enable javascript to see the address]
Website: http://people.csail.mit.edu/dhlin/
Computer Science and Artificial Intelligence Lab
Massachusetts Institute of Technology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://compeng.uni-frankfurt.de/pipermail/vc/attachments/20120526/aecd7d8d/attachment.html>
More information about the Vc
mailing list