Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jul 2000 11:12:43 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        freebsd-alpha@freebsd.org
Subject:   Using the Compaq Math lib natively
Message-ID:  <14720.19316.592646.531221@grasshopper.cs.duke.edu>

next in thread | raw e-mail | index | archive | help

Compaq has a math library that they've put out for linux.  Its
available from http://www.compaq.com/math/introduction/index.html

I started looking at it while doing the linux/alpha emulation work.  I
noticed that it contains no system calls.  It has external references
to libots (another compaq lib).  Between libots and libcpml, only 2
external symbols are referenced:

	U __errno_location
	U __ieee_get_fp_control

I think that we might be able to use libcpml & libots natively if we
wrap them with another library to provide those 2 symbols.  

To test the theory, I built bladenc, added 'int __errno_location,
__ieee_get_fp_control;' to one of the C files and linked with libcpml.
The resulting binary ran (I guess I didn't take any exceptionsl
phew!), produced a playable mp3, and was about 43% faster than a
binary linked with our libm.

Here's a table of the total time taken to produce an mp3 from a 1:40
.wav file given a variety of bladenc binaries on a 600MHz UP1000
(600MHz 21264a, 2MB L2 cache).  For comparison, a 733MHz PIII Xeon
takes about 45.47 for the same file (using the gcc from 4.0-RELEASE).
 
Linux ccc  / libcpml:	29.61
FreeBSD gcc/ libcpml:	42.51
FreeBSD gcc/ libm:	53.93

Does anybody know where to find a description of ieee_get_fp_control()
and errno_location()?  The RH 6.2 linux/alpha box I set up doesn't
seem to have a man page for ieee_get_fp_control().., but it seems to
be in the libc.  Is the source available somehow for the libc.a from
RH6.2?

Also, I haven't examined cxml yet.  I imagine that this will be usable
as well. (cxml used to be called DXML and has BLAS, LAPACK, and other
useful math bits in it).

Cheers,

Drew

------------------------------------------------------------------------------
Andrew Gallatin, Sr Systems Programmer	http://www.cs.duke.edu/~gallatin
Duke University				Email: gallatin@cs.duke.edu
Department of Computer Science		Phone: (919) 660-6590








To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14720.19316.592646.531221>