Message-ID: <49C710D1.8050205@csse.unimelb.edu.au>
Date: 2009-03-23T04:32:17Z
From: Gad Abraham
Subject: cblas on Mac and Linux
In-Reply-To: <B3E12AEB-9C52-4CA8-A2C2-8AA2F2D78219@r-project.org>
Simon Urbanek wrote:
>
> On Mar 20, 2009, at 13:14 , Kasper Daniel Hansen wrote:
>
>> There are Apple specific defines in GCC. As far as I know
>> __APPLE__
>> means compiling on Apple hardware, whereas
>> __APPLE_CC__
>> means compiling using an Apple supplied compiler.
>>
>> However, the first one seems sometimes to be used when the last one is
>> intended.
>>
>
> Note, however, that as Brian suggested neither of the above helps with
> the case under consideration if it is to be portable. Although
> Accelerate can be assumed on (recent) OS X, it doesn't mean that it's
> what R uses or the user wants. In fact BLAS headers are not always
> available, so in most cases the problem listed here is not an issue at
> all since the functions used can be simply declared. The real issue is
> linking against the correct library and R provides no way to do that
> automatically since it doesn't use cblas, so the only reliable way is
> what Brian described.
Thanks to Prof Ripley, Kasper, and Simon.
--
Gad Abraham
MEng Student, Dept. CSSE and NICTA
The University of Melbourne
Parkville 3010, Victoria, Australia
email: gabraham at csse.unimelb.edu.au
web: http://www.csse.unimelb.edu.au/~gabraham