Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!mcsun!hp4nl!dutrun!dutncp8!rob From: rob@dutncp8.tudelft.nl (Rob Kurver) Newsgroups: comp.sys.transputer Subject: Re: 16 Bit Ints Message-ID: Date: 23 Aug 90 23:35:17 GMT References: <9008231939.AA08046@ee16.vuse> Sender: news@dutrun.UUCP Lines: 43 Organisation: Delft University of Technology, The Netherlands In <9008231939.AA08046@ee16.vuse> bapty@VUSE.VANDERBILT.EDU (Theodore Allan Bapty) writes: >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. Obviously, clearing can easily be done with a simple memset(). But if you need signed shorts/ints, you have to go in and sign-extend at some time, be it immediately after the Move2D(), or before you actually do something with them (you were going to use them, right?), so why bother with this call? It is not portable (both across hardware and software), so you don't want to do this kind of coding unless it really pays off. >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. I'm sure the Move2D operation is very fast. But if you have to go in and sign-extend afterwards, I think you loose. I'd like to see some timing figures... It certainly is an interesting use of the 2D move instruction, though. Just my $.02... -- Rob Kurver rob@dutncp8.tudelft.nl Computational Physics Group rob@pact.nl Faculty of Applied Physics, Delft University of Technology The moving cursor writes, and having written, blinks on.