⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 w-mckinnon

📁 C语言版本的矩阵库
💻
字号:
From bmck@bnr.ca Mon Aug 28 10:57:50 1995
Received: from bnr.ca (x400gate.bnr.ca [192.58.194.73]) by gluttony.isc.tamu.edu (8.6.11/8.6.11) with SMTP id KAA05152 for <des@isc.tamu.edu>; Mon, 28 Aug 1995 10:57:42 -0500
X400-Received:  
 by mta bnr.ca in /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Mon, 28 Aug 1995 11:55:55 -0400 
X400-Received:  
 by /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Mon, 28 Aug 1995 10:04:07 -0400 
X400-Received:  
 by /PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/; Relayed; Mon, 28 Aug 1995 09:30:00 -0400 
Date:  Mon, 28 Aug 1995 09:30:00 -0400 
X400-Originator:  /dd.id=1736981/g=bill/i=b/s=mckinnon/@bnr.ca 
X400-MTS-Identifier:  
 [/PRMD=BNR/ADMD=TELECOM.CANADA/C=CA/;bcars735.b.396:28.07.95.14.04.07] 
X400-Content-Type:  P2-1984 (2) 
Content-Identifier:  Re: Meschach ... 
From: "bill (b.) mckinnon" <bmck@bnr.ca>
Sender: "bill (b.) mckinnon" <bmck@bnr.ca>
Message-ID:  <"13392 Mon Aug 28 10:04:17 1995"@bnr.ca> 
To: des@isc.tamu.edu
Subject:  Re: Meschach v.1.2b 
Content-Length: 6245
X-Lines: 267
Status: RO

In message "Meschach v.1.2b", you write:

> Dear Bill,
> 
> 	Thank you for your message.  Please accept my apologies for the
> delayed response...  We are glad to have you as a Meschach user.
> We would also be glad to hear of your suggestions for fixing and improving
> Meschach.  We have had reports of problems with HP machines.
> 
> 				Yours,
> 					David Stewart
>            

David ...

No problem on the delay. I understand the problem ... ;-)

I'm using HP-UX 9.01 on an HP700s.  I started with the "GCC" version of
"machine.h" and "makefile".  After running "./configure", the "machine.h" 
file which is generated "#include'd <malloc.h>" before <stdio.h> (which 
the HP version of "cc" does not like).  My amended version of "machine.h" 
is included below; the differences start around line 68.  

Also, the "cc" compiler seems to require "-Aa" to be put in the CFLAGS in the
makefile (this option forces ANSI compatibility).  Otherwise, the library and
its entries are created, but the functions do not seem be accessible from 
code.  Also, the ".o" files which are created without the "-Aa" are on the
order of ~400 bytes ... a bit small from my experience.  With the "-Aa", the
object files are 1K or 2Kbytes.  Several "redefinitions of macro HUGE_VAL" 
also occur at compilation which don't seem to be a problem.

These changes seem to generate the "meschach.a" library ok.  Let me know if I
can help further.

Bill McKinnon


---------- machine.h ------------

/* machine.h.  Generated automatically by configure.  */
/* Any machine specific stuff goes here */
/* Add details necessary for your own installation here! */

/* RCS id: $Id: machine.h.in,v 1.2 1994/03/13 23:07:30 des Exp $ */

/* This is for use with "configure" -- if you are not using configure
	then use machine.van for the "vanilla" version of machine.h */

/* Note special macros: ANSI_C (ANSI C syntax)
			SEGMENTED (segmented memory machine e.g. MS-DOS)
			MALLOCDECL (declared if malloc() etc have
					been declared) */

#define const 

/* #undef MALLOCDECL */
#define NOT_SEGMENTED 1
#define HAVE_MEMORY_H 1
/* #undef HAVE_COMPLEX_H */
#define HAVE_MALLOC_H 1
#define STDC_HEADERS 1
#define HAVE_BCOPY 1
#define HAVE_BZERO 1
#define CHAR0ISDBL0 1
#define WORDS_BIGENDIAN 1
/* #undef U_INT_DEF */
#define VARARGS 1
/* #undef HAVE_PROTOTYPES */
/* #undef HAVE_PROTOTYPES_IN_STRUCT */

/* for inclusion into C++ files */
#ifdef __cplusplus
#define ANSI_C 1
#ifndef HAVE_PROTOTYPES 
#define HAVE_PROTOTYPES 1
#endif
#ifndef HAVE_PROTOTYPES_IN_STRUCT
#define HAVE_PROTOTYPES_IN_STRUCT 1
#endif
#endif /* __cplusplus */

/* example usage: VEC *PROTO(v_get,(int dim)); */
#ifdef HAVE_PROTOTYPES
#define	PROTO(name,args)	name args
#else
#define PROTO(name,args)	name()
#endif /* HAVE_PROTOTYPES */
#ifdef HAVE_PROTOTYPES_IN_STRUCT
/* PROTO_() is to be used instead of PROTO() in struct's and typedef's */
#define	PROTO_(name,args)	name args
#else
#define PROTO_(name,args)	name()
#endif /* HAVE_PROTOTYPES_IN_STRUCT */

/* for basic or larger versions */
#define COMPLEX 1
#define SPARSE 1

/* for loop unrolling */
/* #undef VUNROLL */
/* #undef MUNROLL */

/* for segmented memory */
#ifndef NOT_SEGMENTED
#define	SEGMENTED
#endif

<<<<<<<<<<<<<<<<<< differences start here --- BMcK >>>>>>>>>>>>>>>>>>>>>

/* any compiler should have this header */
/* if not, change it */
#include        <stdio.h>


/* Check for ANSI C memmove and memset */
#ifdef STDC_HEADERS

/* standard copy & zero functions */
#define	MEM_COPY(from,to,size)	memmove((to),(from),(size))
#define	MEM_ZERO(where,size)	memset((where),'\0',(size))

#ifndef ANSI_C
#define ANSI_C 1
#endif

#endif

/* standard headers */
#ifdef ANSI_C
#include	<stdlib.h>
#include	<stddef.h>
#include	<string.h>
#include	<float.h>
#endif


/* if the system has malloc.h */
#ifdef HAVE_MALLOC_H
#define	MALLOCDECL	1
#include	<malloc.h>
#endif

<<<<<<<<<<<<<<<<< end of differences --- BMcK >>>>>>>>>>>>>>>>>>>

/* if have bcopy & bzero and no alternatives yet known, use them */
#ifdef HAVE_BCOPY
#ifndef MEM_COPY
/* nonstandard copy function */
#define	MEM_COPY(from,to,size)	bcopy((char *)(from),(char *)(to),(int)(size))
#endif
#endif

#ifdef HAVE_BZERO
#ifndef MEM_ZERO
/* nonstandard zero function */
#define	MEM_ZERO(where,size)	bzero((char *)(where),(int)(size))
#endif
#endif

/* if the system has complex.h */
#ifdef HAVE_COMPLEX_H
#include	<complex.h>
#endif

/* If prototypes are available & ANSI_C not yet defined, then define it,
	but don't include any header files as the proper ANSI C headers
        aren't here */
#ifdef HAVE_PROTOTYPES
#ifndef ANSI_C
#define ANSI_C  1
#endif
#endif

/* floating point precision */

/* you can choose single, double or long double (if available) precision */

#define FLOAT 		1
#define DOUBLE 		2
#define LONG_DOUBLE 	3

/* #undef REAL_FLT */
/* #undef REAL_DBL */

/* if nothing is defined, choose double precision */
#ifndef REAL_DBL
#ifndef REAL_FLT
#define REAL_DBL 1
#endif
#endif

/* single precision */
#ifdef REAL_FLT
#define  Real float
#define  LongReal float
#define REAL FLOAT
#define LONGREAL FLOAT
#endif

/* double precision */
#ifdef REAL_DBL
#define Real double
#define LongReal double
#define REAL DOUBLE
#define LONGREAL DOUBLE
#endif


/* machine epsilon or unit roundoff error */
/* This is correct on most IEEE Real precision systems */
#ifdef DBL_EPSILON
#if REAL == DOUBLE
#define	MACHEPS	DBL_EPSILON
#elif REAL == FLOAT
#define	MACHEPS	FLT_EPSILON
#elif REAL == LONGDOUBLE
#define MACHEPS LDBL_EPSILON
#endif
#endif

#define F_MACHEPS 1.19209e-07
#define D_MACHEPS 2.22045e-16

#ifndef MACHEPS
#if REAL == DOUBLE
#define	MACHEPS	D_MACHEPS
#elif REAL == FLOAT  
#define MACHEPS F_MACHEPS
#elif REAL == LONGDOUBLE
#define MACHEPS D_MACHEPS
#endif
#endif

/* #undef M_MACHEPS */

/********************
#ifdef DBL_EPSILON
#define	MACHEPS	DBL_EPSILON
#endif
#ifdef M_MACHEPS
#ifndef MACHEPS
#define MACHEPS	M_MACHEPS
#endif
#endif
********************/

#define	M_MAX_INT 2147483647
#ifdef	M_MAX_INT
#ifndef MAX_RAND
#define	MAX_RAND ((double)(M_MAX_INT))
#endif
#endif

/* for non-ANSI systems */
#ifndef HUGE_VAL
#define HUGE_VAL HUGE
#else
#ifndef HUGE
#define HUGE HUGE_VAL
#endif
#endif


#ifdef ANSI_C
extern	int	isatty(int);
#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -