Re: Modulo n arithmetics

tve@crackle.CS.Berkeley.EDU (Thorsten von Eicken)
Fri, 20 Nov 1992 00:55:35 GMT

          From comp.compilers

Related articles
[2 earlier articles]
Re: Modulo n arithmetics drclark@daisy.uwaterloo.ca (David R. Clark) (1992-11-11)
Re: Modulo n arithmetics dneedham@oucsace.cs.ohiou.edu (1992-11-11)
Modulo n arithmetics wchsieh@beethoven.lcs.mit.edu (1992-11-11)
Re: Modulo n arithmetics wendt@CS.ColoState.EDU (1992-11-15)
Re: Modulo n arithmetics johnr@ee.uts.edu.au (1992-11-17)
Re: Modulo n arithmetics chris@gargoyle.uchicago.edu (1992-11-19)
Re: Modulo n arithmetics tve@crackle.CS.Berkeley.EDU (1992-11-20)
Re: Modulo n arithmetics pcg@aber.ac.uk (1992-11-29)
| List of all articles for this month |

Newsgroups: comp.compilers
From: tve@crackle.CS.Berkeley.EDU (Thorsten von Eicken)
Organization: University of California, Berkeley
Date: Fri, 20 Nov 1992 00:55:35 GMT
Keywords: arithmetic
References: 92-11-029

Christian Fabre <fabre@gr.osf.org> writes:
>I am wondering if any languages or application heavily rely on
>modulo arithmetics:


On parallel machines without hardware support for a global address space a
global pointer can be represented as a 64bit <proc,addr> pair (processor
and local address). If you want to interleave global memory, then pointer
arithmetic requires lots of (mod P), where P is the number of processors:
e.g. "ptr+5", where ptr is a global pointer, turns into


ptr.addr += (ptr.proc+5)/P; ptr.proc = (ptr.proc+5)%P;


Of course, if P is a power of two, you can use shifts and masks.


Thorsten von Eicken
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.