Article View: comp.sys.transputer
Article #933RE: 16 Bit Ints
From: Theodore Allan Bapty
Date: Thu, 23 Aug 1990 19:39
Date: Thu, 23 Aug 1990 19:39
31 lines
1400 bytes
1400 bytes
If you can afford the extra memory space, it
is more efficient to use 32 bit ints. You should
translate to 32 bits first. To avoid alot of
overhead in the translation between sizes, you can
use the MOVE2D operation. Under Logical Systems C
try this command:
Move2D(source_16,dest_32,2,NUM_VALS,2,4);
where source_16 is the 16 bit int source,
and dest_32 is the 32 bit int destination array.
Note that the upper 2 bytes of the destination
array are unaffected, so you'll have to
clear/sign-extend them if you application requires
it. Also note that this
requires a T8, since the T414 doesn't have the
2D move operation.
I don't have any actual timing figures, but it should
be more efficient than a programmed loop for
translating arrays of values. The instruction
appears to operate at bus rates (2*NUM_VALS) after the
(31 cycle) setup time. There are also other variations
on the move2d instruction that may fit your application.
ted bapty (bapty@vuse.vanderbilt.edu)
Technical Details
Message-ID:
<9008231939.AA08046@ee16.vuse>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!VUSE.VANDERBILT.EDU!baptyShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!VUSE.VANDERBILT.EDU!bapty From: bapty@VUSE.VANDERBILT.EDU (Theodore Allan Bapty) Newsgroups: comp.sys.transputer Subject: RE: 16 Bit Ints Message-ID: <9008231939.AA08046@ee16.vuse> Date: 23 Aug 90 19:39:03 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 31