ext/nmatrix/util/math.cpp in nmatrix-0.0.3 vs ext/nmatrix/util/math.cpp in nmatrix-0.0.4

- old
+ new

@@ -7,12 +7,12 @@ // NMatrix was originally inspired by and derived from NArray, by // Masahiro Tanaka: http://narray.rubyforge.org // // == Copyright Information // -// SciRuby is Copyright (c) 2010 - 2012, Ruby Science Foundation -// NMatrix is Copyright (c) 2012, Ruby Science Foundation +// SciRuby is Copyright (c) 2010 - 2013, Ruby Science Foundation +// NMatrix is Copyright (c) 2013, Ruby Science Foundation // // Please see LICENSE.txt for additional copyright notices. // // == Contributing // @@ -217,22 +217,22 @@ * Function signature conversion for calling CBLAS's gemv functions as directly as possible. * * For documentation: http://www.netlib.org/lapack/double/dgetrf.f */ template <typename DType> -inline static bool cblas_gemv(const enum CBLAS_TRANSPOSE trans_a, - int m, int n, - void* alpha, - void* a, int lda, - void* x, int incx, - void* beta, - void* y, int incy) +inline static bool cblas_gemv(const enum CBLAS_TRANSPOSE trans, + const int m, const int n, + const void* alpha, + const void* a, const int lda, + const void* x, const int incx, + const void* beta, + void* y, const int incy) { - return gemv<DType>(trans_a, - m, n, reinterpret_cast<DType*>(alpha), - reinterpret_cast<DType*>(a), lda, - reinterpret_cast<DType*>(x), incx, reinterpret_cast<DType*>(beta), + return gemv<DType>(trans, + m, n, reinterpret_cast<const DType*>(alpha), + reinterpret_cast<const DType*>(a), lda, + reinterpret_cast<const DType*>(x), incx, reinterpret_cast<const DType*>(beta), reinterpret_cast<DType*>(y), incy); } /* @@ -589,10 +589,10 @@ VALUE a, VALUE lda, VALUE x, VALUE incx, VALUE beta, VALUE y, VALUE incy) { - NAMED_DTYPE_TEMPLATE_TABLE(ttable, nm::math::cblas_gemv, bool, const enum CBLAS_TRANSPOSE trans_a, int m, int n, void* alpha, void* a, int lda, void* x, int incx, void* beta, void* y, int incy); + NAMED_DTYPE_TEMPLATE_TABLE(ttable, nm::math::cblas_gemv, bool, const enum CBLAS_TRANSPOSE, const int, const int, const void*, const void*, const int, const void*, const int, const void*, void*, const int) nm::dtype_t dtype = NM_DTYPE(a); void *pAlpha = ALLOCA_N(char, DTYPE_SIZES[dtype]), *pBeta = ALLOCA_N(char, DTYPE_SIZES[dtype]);