🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #12089

Re: More on Linpack pivoting: isamax and instruction set design

#12089
From: Chris Green
Date: Fri, 14 Jun 1991 15:45
38 lines
2028 bytes
In article <1991Jun13.234834.22970@neon.Stanford.EDU> andy@DEC-Lite.Stanford.EDU (Andy Freeman) writes:
>In article <396@validgh.com> dgh@validgh.com (David G. Hough on validgh) writes:
>>      do 30 i = 2,n
>>         if(abs(dx(i)).le.dmax) go to 30
>>         isamax = i
>>         dmax = abs(dx(i))
>>   30 continue
>

	Motorola's DSP 96000 family has some instructions that would help this
loop out a lot. They have conditional assign, and two moves per instruction.

I think the code for this loop could be done with the following instructions
(I don't know the exact mnemonics, but here's the general idea):


	int abs1=dx(0)
	i=&dx[2]

lp:	set abs1=abs(abs1). fetch *(i++) to abs2
	compare abs1 to dmax
	conditionally store i to isamax and abs1 to dmax
	
	set abs2=abs(abs2). fetch *(i++) to abs1
	compare abs2 to dmax
	conditionally store i to isamax and abs2 to dmax

	6 instructions for 2 iterations ain't bad. you'd have to do one SUB at
the end to correct isamax to be i instead of &dx[i]. zero overhead looping handles
the iteration.

-- 
*-------------------------------------------*---------------------------*
|Chris Green - Graphics Software Engineer   - chrisg@commodore.COM      f
|                  Commodore-Amiga          - uunet!cbmvax!chrisg       n
|My opinions are my own, and do not         - killyouridolssonicdeath   o
|necessarily represent those of my employer.- itstheendoftheworld       r
*-------------------------------------------*---------------------------d
Technical Details
Message-ID: <22457@cbmvax.commodore.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!rutgers!cbmvax!chrisg
References: <396@validgh.com> <1991Jun13.234834.22970@neon.Stanford.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!rutgers!cbmvax!chrisg
From: chrisg@cbmvax.commodore.com (Chris Green)
Newsgroups: comp.arch
Subject: Re: More on Linpack pivoting: isamax and instruction set design
Message-ID: <22457@cbmvax.commodore.com>
Date: 14 Jun 91 15:45:33 GMT
References: <396@validgh.com> <1991Jun13.234834.22970@neon.Stanford.EDU>
Reply-To: chrisg@cbmvax.commodore.com (Chris Green)
Organization: Commodore, West Chester, PA
Lines: 38