[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GMP compiled under MacOS/C++ wrap
From: |
Torbjorn Granlund |
Subject: |
Re: GMP compiled under MacOS/C++ wrap |
Date: |
24 Apr 2001 15:43:18 +0200 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) Emacs/20.6 |
Hans Aberg <address@hidden> writes:
At 13:02 +0200 2001/04/24, Torbjorn Granlund wrote:
>It is a stretch to call the G4 a 128-bit CPU. It has SIMD
>instructions operation on 128-bit registers, but it is still a 32-bit
>CPU.
The new "titanium" power book has a G4 with a "velocity engine" which is
claimed to be 128-bit vectored into 4 32-bit words.
Sure, there are 128-bit SIMD instructions as I said.
The memory bus size also seemed to be 64 or 128 bit, by some speed
computations I made.
I don't understand how you can tell the memory bus width from speed
tests. In fact, that should be impossible.
But I have been unable to find document giving the exact details.
The G4 manuals are available from Motorola's literature centre. I
don't have the exact URL, but I know they are there since I have
downloaded them.
>It is a different question what limb size we should use in GMP. We
>need a C type that matches a limb, and that limits the choices. I
>strongly doubt usign anything but 32 bits would be a god idea.
Is this necessary if you write assembler instructions for the basic math
operations?
Yes.
> - mpq_swap, mpf_swap are mentioned in the manual, but are not in the gmp.h
> header.
>
>They seem to be there now.
Is there a later version than <ftp://ftp.gnu.org/pub/gnu/gmp/gmp-3.0.tar.gz>?
Yes, 3.1.1 has been out several months.
This is a good idea, but GCC is not available under pre-MacOS X, except by
using Tenon Mach/UNIX, which I did a few years ago. That old GCC could not
compile my C++ code, so I switched to CodeWarrior because of that.
The Mac OS 10.0.1 release come with the GNU C++ compiler. It lives in
usr/libexec/gcc/darwin/ppc/2.95.2/cc1plus.
> - In gmp.h, I noticed the lines:
> /* Really use `defined (__STDC__)' here; we want it to be true for Sun
>C */
> #if defined (__STDC__) || defined (__cplusplus)
> Note that under C++ (cf. C.1.9:1 in the C++ standard), __STDC__
> implementation defined.
>
>What is your point here?
My impression from reading this comment was that you had put in
"defined(__cplusplus)" just in order to make it work for Sun C/C++ (but I
perhaps read it wrong). But it is normal to not have __STDC__ defined under
C++.
Sure, that's why the test on __cplusplus is there.
--
Torbjörn
- GMP compiled under MacOS/C++ wrap, Hans Aberg, 2001/04/23
- Re: GMP compiled under MacOS/C++ wrap, Torbjorn Granlund, 2001/04/24
- Re: GMP compiled under MacOS/C++ wrap, Hans Aberg, 2001/04/24
- Re: GMP compiled under MacOS/C++ wrap,
Torbjorn Granlund <=
- Re: GMP compiled under MacOS/C++ wrap, Hans Aberg, 2001/04/24
- Re: GMP compiled under MacOS/C++ wrap, Kevin Ryde, 2001/04/24
- Re: GMP compiled under MacOS/C++ wrap, Hans Aberg, 2001/04/25
- Re: GMP compiled under MacOS/C++ wrap, Kevin Ryde, 2001/04/25
- Re: GMP compiled under MacOS/C++ wrap, Hans Aberg, 2001/04/26
- GMP MacOS PPC assembler, Hans Aberg, 2001/04/26
- Re: GMP MacOS PPC assembler, Linus Nordberg, 2001/04/26
- Re: GMP MacOS PPC assembler, Hans Aberg, 2001/04/26
- Re: GMP MacOS PPC assembler, Torbjorn Granlund, 2001/04/27
- Re: GMP MacOS PPC assembler, Hans Aberg, 2001/04/27