disable GSL vector lib on MacOS x86
This commit is contained in:
@@ -13,8 +13,13 @@
|
|||||||
#include "arch/Dialog/Dialog.h"
|
#include "arch/Dialog/Dialog.h"
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
#if defined(MACOSX)
|
#if defined(MACOSX) && defined(__ppc__)
|
||||||
|
# define USE_VECLIB
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_VECLIB)
|
||||||
// Work around global namespace pollution.
|
// Work around global namespace pollution.
|
||||||
|
// www.gnu.org/software/gsl/manual/gsl-ref_43.html
|
||||||
namespace vblas
|
namespace vblas
|
||||||
{
|
{
|
||||||
# include <vecLib/vBLAS.h>
|
# include <vecLib/vBLAS.h>
|
||||||
@@ -90,7 +95,7 @@ void RageVec3TransformNormal( RageVector3* pOut, const RageVector3* pV, const Ra
|
|||||||
|
|
||||||
void RageVec4TransformCoord( RageVector4* pOut, const RageVector4* pV, const RageMatrix* pM )
|
void RageVec4TransformCoord( RageVector4* pOut, const RageVector4* pV, const RageMatrix* pM )
|
||||||
{
|
{
|
||||||
#if defined(MACOSX)
|
#if defined(USE_VECLIB)
|
||||||
// (M^t * v)^t = v^t * M
|
// (M^t * v)^t = v^t * M
|
||||||
cblas_sgemv(CblasRowMajor, CblasTrans, 4, 4, 1, &pM->m00, 4, &pV->x, 1,
|
cblas_sgemv(CblasRowMajor, CblasTrans, 4, 4, 1, &pM->m00, 4, &pV->x, 1,
|
||||||
0, &pOut->x, 1);
|
0, &pOut->x, 1);
|
||||||
@@ -135,7 +140,7 @@ RageMatrix RageMatrix::GetTranspose() const
|
|||||||
|
|
||||||
void RageMatrixMultiply( RageMatrix* pOut, const RageMatrix* pA, const RageMatrix* pB )
|
void RageMatrixMultiply( RageMatrix* pOut, const RageMatrix* pA, const RageMatrix* pB )
|
||||||
{
|
{
|
||||||
#if defined(MACOSX)
|
#if defined(USE_VECLIB)
|
||||||
cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 4, 4, 4, 1,
|
cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 4, 4, 4, 1,
|
||||||
&pB->m00, 4, &pA->m00, 4, 0, &pOut->m00, 4);
|
&pB->m00, 4, &pA->m00, 4, 0, &pOut->m00, 4);
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user