ext/nmatrix_lapacke/math_lapacke.cpp in nmatrix-lapacke-0.2.0 vs ext/nmatrix_lapacke/math_lapacke.cpp in nmatrix-lapacke-0.2.1

- old
+ new

@@ -211,12 +211,12 @@ if (dtype == nm::RUBYOBJ) { rb_ary_store(result, 0, *reinterpret_cast<VALUE*>(pC)); rb_ary_store(result, 1, *reinterpret_cast<VALUE*>(pS)); } else { - rb_ary_store(result, 0, rubyobj_from_cval(pC, dtype).rval); - rb_ary_store(result, 1, rubyobj_from_cval(pS, dtype).rval); + rb_ary_store(result, 0, nm::rubyobj_from_cval(pC, dtype).rval); + rb_ary_store(result, 1, nm::rubyobj_from_cval(pS, dtype).rval); } NM_CONSERVATIVE(nm_unregister_value(&ab)); NM_CONSERVATIVE(nm_unregister_value(&self)); return result; } @@ -332,11 +332,11 @@ void *Result = NM_ALLOCA_N(char, DTYPE_SIZES[rdtype]); ttable[dtype](FIX2INT(n), NM_STORAGE_DENSE(x)->elements, FIX2INT(incx), Result); - return rubyobj_from_cval(Result, rdtype).rval; + return nm::rubyobj_from_cval(Result, rdtype).rval; } } @@ -381,11 +381,11 @@ void *Result = NM_ALLOCA_N(char, DTYPE_SIZES[rdtype]); ttable[dtype](FIX2INT(n), NM_STORAGE_DENSE(x)->elements, FIX2INT(incx), Result); - return rubyobj_from_cval(Result, rdtype).rval; + return nm::rubyobj_from_cval(Result, rdtype).rval; } /* * call-seq: * NMatrix::BLAS.cblas_imax(n, vector, inc) -> Fixnum @@ -650,11 +650,11 @@ if (TYPE(ipiv) != T_ARRAY) { rb_raise(rb_eArgError, "ipiv must be of type Array"); } else { ipiv_ = NM_ALLOCA_N(int, RARRAY_LEN(ipiv)); for (int index = 0; index < RARRAY_LEN(ipiv); ++index) { - ipiv_[index] = FIX2INT( RARRAY_PTR(ipiv)[index] ); + ipiv_[index] = FIX2INT( RARRAY_AREF(ipiv, index) ); } } if (!ttable[NM_DTYPE(a)]) { rb_raise(rb_eNotImpError, "this operation not yet implemented for non-BLAS dtypes"); @@ -742,10 +742,10 @@ if (TYPE(ipiv) != T_ARRAY) { rb_raise(rb_eArgError, "ipiv must be of type Array"); } else { ipiv_ = NM_ALLOCA_N(int, RARRAY_LEN(ipiv)); for (int index = 0; index < RARRAY_LEN(ipiv); ++index) { - ipiv_[index] = FIX2INT( RARRAY_PTR(ipiv)[index] ); + ipiv_[index] = FIX2INT( RARRAY_AREF(ipiv, index) ); } } if (!ttable[NM_DTYPE(a)]) { rb_raise(nm_eDataTypeError, "this matrix operation undefined for integer matrices");