[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why NDArray is faster than int32NDArray?
From: |
Hamid 2C |
Subject: |
Re: Why NDArray is faster than int32NDArray? |
Date: |
Thu, 28 Jul 2011 22:55:54 +0430 |
> The data for an NDArray object is stored in an array of native double
> values.
>
> Because of the semantics of integer operations that Octave must
> implement for compatibility with Matlab, the data for an int32NDArray
> object is stored as an array of octave_int32 objects. The
> multiplication and addition operators for octave_int32 objects must do
> more than just multiply integer values. They must also handle the
> saturation semantics of Matlab's integer types.
>
> If you want to use native integer multiplication with wrapping
> semantics, you'll have to do something different.
>
Thanks for your reply. Could you please point me to some direction (to
perform native integer multiplication). I would like to have a
function that can be dynamically loaded to Octave and get its
parameters (which are known to be matrices of integer) from the Octave
interpreter.
Hamid