RE: [myrinet] division operation
"Ritch, David" <[email protected]>
| Newsgroups | gmane.network.myrinet.general |
|---|---|
| Message-ID | <E2F90491BAC4D511AD8C00105AC5C9A0070934@hpti_main.hpti.com> |
All of the divides that I see in that code are divisions by constants - did I miss any? Gcc is bright enough to convert those into multiplication by its reciprocal. In fact, I believe that if the division is by a constant power of 2, as this may be (depending on the value of GM_PAGE_LEN) gcc will use a bit shift. It is often easier to use an intuitive representation, and let the compiler convert it to something that is more efficient. The hard trick is to know what intuitive representations the compiler is smart enough to map effectively onto the hardware. dbr > -----Original Message----- > From: Edgar A. Leon [mailto:[email protected]] > Sent: Thursday, November 29, 2001 3:52 PM > To: [email protected] > Subject: [myrinet] division operation > > > > Considering that there's no division in the LANai instruction set, I > find interesting that in the file gmcp.c, part of the mcp code uses > divisions. Anybody knows why is that? > > In particular, here's part of the code: [...] -- David B. Ritch High Performance Technologies, Inc. [email protected]