FIAS . Impressum . Privacy

Need of clang++ support and the exp function

Matthias Kretz [please enable javascript to see the address]
Tue May 29 09:56:31 CEST 2012


Hi Dahua,

I already added support for clang in the master branch of Vc. Clang 3.1 seems 
to be working fine. Clang 3.0 has major issues, though (see here: 
http://code.compeng.uni-
frankfurt.de/dashboard/viewBuildError.php?buildid=73574).

I only tested clang on Linux, though. There might still be MacOS issues in Vc. 
I'd be happy to fix those, if you give me the details. (But please note that 
I'll be on vacation until June 11th.)

To get started with the master branch I recommend to download Vc via git. If 
you're not familiar with git yet you can also download a tarball of the most 
recent master checkout: http://gitorious.org/vc/vc/archive-tarball/master .

The exp function also exists in master. I just realized I forgot to document 
it - but I just fixed that and tonight the docs on the webpage will update.

Let me know how it works out and if you have any issues.

Regards,
  	Matthias

On Saturday 26 May 2012 12:40:42 Dahua Lin wrote:
> 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
-- 
Dipl.-Phys. Matthias Kretz
http://compeng.uni-frankfurt.de/?mkretz

SIMD easy and portable: http://compeng.uni-frankfurt.de/?vc



More information about the Vc mailing list
FIAS . Impressum . Privacy