|
From: <kin...@us...> - 2025-08-16 00:04:58
|
Revision: 7283
http://sourceforge.net/p/teem/code/7283
Author: kindlmann
Date: 2025-08-16 00:04:55 +0000 (Sat, 16 Aug 2025)
Log Message:
-----------
stragglers from the DirectIO and QNaNHiBit removals
Modified Paths:
--------------
teem/trunk/src/HELP.txt
teem/trunk/src/TODO.txt
teem/trunk/src/air/sane.c
teem/trunk/src/air/test/fp.c
teem/trunk/src/bin/airSanity.c
teem/trunk/src/gage/miscGage.c
teem/trunk/src/make/aix.mk
teem/trunk/src/make/boiler.mk
teem/trunk/src/make/cygwin.mk
teem/trunk/src/make/darwin.mk
teem/trunk/src/make/irix6.mk
teem/trunk/src/make/linux.mk
teem/trunk/src/make/netbsd.mk
teem/trunk/src/make/solaris.mk
teem/trunk/src/nrrd/format.c
teem/trunk/src/nrrd/formatEPS.c
teem/trunk/src/nrrd/formatNRRD.c
teem/trunk/src/nrrd/formatPNG.c
teem/trunk/src/nrrd/formatPNM.c
teem/trunk/src/nrrd/formatText.c
teem/trunk/src/nrrd/formatVTK.c
teem/trunk/src/nrrd/newformat.txt
teem/trunk/src/nrrd/nrrd.h
Modified: teem/trunk/src/HELP.txt
===================================================================
--- teem/trunk/src/HELP.txt 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/HELP.txt 2025-08-16 00:04:55 UTC (rev 7283)
@@ -4,22 +4,17 @@
** on Teem 2.0 because they don't involve API changes.
-Update NrrdIO's CMakeLists.txt file. While Teem has a good working
+Update NrrdIO's CMakeLists.txt file. While Teem has an ok and maintained
CMakeLists.txt file:
<http://sourceforge.net/p/teem/code/HEAD/tree/teem/trunk/CMakeLists.txt#l86>
NrrdIO has a fairly meagre one:
<http://sourceforge.net/p/teem/code/HEAD/tree/NrrdIO/trunk/CMakeLists.txt>
-Note how NrrdIO's CMakeLists.txt file doesn't really have proper handling
-of qnanhibit; it says "The QNANHIBIT variable is configured by the root
-level CMakeLists.txt". But that's bogus- it's a copy-and-paste from the
-CMakeLists.txt from ITK's NrrdIO, whereas this NrrdIO is entirely
-stand-alone. What is required to teach NrrdIO's CMakeLists.txt about how to
-learn qnanhitbit at configure-time? What other best practices are in
-Teem's CMakeLists.txt that should be copied in NrrdIO's (or introduced
-there if Teem's is out dated)? You can get a copy of NrrdIO via:
-svn co http://svn.code.sf.net/p/teem/code/NrrdIO/trunk/ NrrdIO
-The source files here are largely extracted automatically by Teem code,
-via running:
+
+What best practices are in Teem's CMakeLists.txt that should be copied in
+NrrdIO's (or introduced there if Teem's is out dated)? You can get a copy of
+NrrdIO via: svn co http://svn.code.sf.net/p/teem/code/NrrdIO/trunk/ NrrdIO The
+source files here are largely extracted automatically by Teem code, via
+running:
make -f pre-GNUmakefile
clean make -f pre-GNUmakefile
But the CMakeLists.txt file there is specific to NrrdIO; it isn't copied
Modified: teem/trunk/src/TODO.txt
===================================================================
--- teem/trunk/src/TODO.txt 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/TODO.txt 2025-08-16 00:04:55 UTC (rev 7283)
@@ -64,7 +64,6 @@
"inf", "-inf", "nan", and now "pi" on parsing. And this will be a
place to handle setlocale weirness. However, the "Single"
restriction is too cumbersome.
-* consider nixing AIR_ENDIAN, AIR_QNANHIBIT, and AIR_DIO
******* Hey, what does airSinglePrintf do with the common "%.17g" for a double?
It seems to not have the smarts to see that it is fact for a double.
* airArray->len should probably be size_t, not unsigned int. Along with
Modified: teem/trunk/src/air/sane.c
===================================================================
--- teem/trunk/src/air/sane.c 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/air/sane.c 2025-08-16 00:04:55 UTC (rev 7283)
@@ -159,7 +159,7 @@
there are more platforms for which (apparently) passing AIR_SNAN to
airFPClass_d changes it to a quiet NaN, which defeats the purpose
of the test. To summarize, given that:
- ** AIR_NAN and AIR_QNAN are checked here to be quiet NaN, after
+ ** AIR_NAN checked here to be quiet NaN, after
casting to both float and double,
** quiet NaN "hi bit" is tested above, and that
** quiet and signalling NaN are mutually exclusive,
@@ -168,7 +168,8 @@
following line is now commented out for all platforms.
*/
/* && airFP_SNAN == airFPClass_f((double)AIR_SNAN) */
- /* (and on August 15 2025 GLK decides to drop SNAN altogether) */
+ /* (and on August 15 2025 GLK decides to totally drop QNAN-vs-SNAN,
+ along with all handling of "qnanhibit") */
&& airFP_NAN == airFPClass_d((double)AIR_NAN))) {
return airInsane_AIR_NAN;
}
@@ -192,11 +193,10 @@
"AIR_EXISTS(NaN) was true", /* 4: airInsane_NaNExists */
"AIR_EXISTS() was false for some finite values", /* 5: airInsane_ExistsBad */
"air_FPClass_f() wrong after double->float assign", /* 6: airInsane_FltDblFPClass */
- "TEEM_QNANHIBIT is wrong", /* 7: airInsane_QNaNHiBit */
- "airFPClass(AIR_QNAN) wrong", /* 8: airInsane_AIR_NAN */
- "unsigned char isn't 8 bits", /* 9: airInsane_UCSize */
- "sizeof(float), sizeof(int) not both == 4", /* 10: airInsane_FISize */
- "sizeof(double), sizeof(airLLong) not both == 8", /* 11: airInsane_DLSize */
+ "airFPClass(AIR_NAN) wrong", /* 7: airInsane_AIR_NAN */
+ "unsigned char isn't 8 bits", /* 8: airInsane_UCSize */
+ "sizeof(float), sizeof(int) not both == 4", /* 9: airInsane_FISize */
+ "sizeof(double), sizeof(airLLong) not both == 8", /* 10: airInsane_DLSize */
};
static const char _airBadInsane[] = "(invalid insane value)";
Modified: teem/trunk/src/air/test/fp.c
===================================================================
--- teem/trunk/src/air/test/fp.c 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/air/test/fp.c 2025-08-16 00:04:55 UTC (rev 7283)
@@ -20,7 +20,6 @@
*/
#include "../air.h"
-#include <teemQnanhibit.h>
char *me;
@@ -41,12 +40,11 @@
airFPFprintf_f(stdout, g);
hibit = (*((unsigned int *)&g) >> 22) & 1;
printf("hi bit of 23-bit fraction field = %u\n", hibit);
- if (hibit == airMyQNaNHiBit) {
- printf("(agrees with airMyQNaNHiBit)\n");
+ if (hibit == 1) {
+ printf("(agrees with qnan hi bit==1 assumed in air/754.c)\n");
} else {
printf("%s: !!!!\n", me);
- printf("%s: !!!! PROBLEM: nan's hi bit is NOT airMyQNaNHiBit (%d)\n", me,
- airMyQNaNHiBit);
+ printf("%s: !!!! PROBLEM: nan's hi bit is NOT 1 (assumed in air/754.c)\n", me);
printf("%s: !!!!\n", me);
}
@@ -100,9 +98,8 @@
printf(" - - - - - - - - - - - - - - - -\n");
printf(" - - - - - - - - - - - - - - - -\n");
- f = AIR_SNAN;
- printf("SNaN test: f = SNaN = float(0x%x) = %.9g; (QNaNHiBit = %u)\n", airFloatSNaN.i,
- f, airMyQNaNHiBit);
+ f = AIR_NAN;
+ printf("NaN test: f = NaN = float(0x%x) = %.9g;\n", airFloatNaN.i, f);
airFPFprintf_f(stdout, f);
g = f * f;
printf("g = f*f = %.9g\n", g);
Modified: teem/trunk/src/bin/airSanity.c
===================================================================
--- teem/trunk/src/bin/airSanity.c 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/bin/airSanity.c 2025-08-16 00:04:55 UTC (rev 7283)
@@ -1,6 +1,6 @@
/*
Teem: Tools to process and visualize scientific data and images
- Copyright (C) 2009--2023 University of Chicago
+ Copyright (C) 2009--2025 University of Chicago
Copyright (C) 2005--2008 Gordon Kindlmann
Copyright (C) 1998--2004 University of Utah
@@ -34,8 +34,6 @@
fprintf(stderr, "%s: air sanity check passed.\n", me);
fprintf(stderr, "\n");
fprintf(stderr, "airMyEndian() == %d\n", airMyEndian());
- fprintf(stderr, "AIR_QNANHIBIT == %d\n", AIR_QNANHIBIT);
- fprintf(stderr, "AIR_DIO == %d\n", AIR_DIO);
fprintf(stderr, "sizeof(size_t) = %s\n", airSprintSize_t(stmp, sizeof(size_t)));
fprintf(stderr, "sizeof(void*) = %s\n", airSprintSize_t(stmp, sizeof(void *)));
return 0;
Modified: teem/trunk/src/gage/miscGage.c
===================================================================
--- teem/trunk/src/gage/miscGage.c 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/gage/miscGage.c 2025-08-16 00:04:55 UTC (rev 7283)
@@ -131,7 +131,7 @@
if (point) {
unsigned int big;
/* learned: can't initialize the floating point to AIR_NAN,
- non-dot-net windows compilers proclaim that QNAN == x
+ non-dot-net windows compilers proclaim that NAN == x
for any existent x!!! For some reason though, infinity
is handled correctly */
ELL_4V_SET(point->frac, AIR_POS_INF, AIR_POS_INF, AIR_POS_INF, AIR_POS_INF);
Modified: teem/trunk/src/make/aix.mk
===================================================================
--- teem/trunk/src/make/aix.mk 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/make/aix.mk 2025-08-16 00:04:55 UTC (rev 7283)
@@ -29,9 +29,6 @@
ARCH_CFLAG =
ARCH_LDFLAG =
-TEEM_QNANHIBIT = 1
-TEEM_DIO = 0
-
TEEM_ZLIB.IPATH ?=
TEEM_ZLIB.LPATH ?=
Modified: teem/trunk/src/make/boiler.mk
===================================================================
--- teem/trunk/src/make/boiler.mk 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/make/boiler.mk 2025-08-16 00:04:55 UTC (rev 7283)
@@ -55,9 +55,6 @@
$(L).PRIVATE_HEADERS =
$(L).OBJS =
$(L).TESTS =
-
-$(L).NEED_QNANHIBIT =
-$(L).NEED_DIO =
####
####
####
Modified: teem/trunk/src/make/cygwin.mk
===================================================================
--- teem/trunk/src/make/cygwin.mk 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/make/cygwin.mk 2025-08-16 00:04:55 UTC (rev 7283)
@@ -34,9 +34,6 @@
ARCH_CFLAG =
ARCH_LDFLAG =
-TEEM_QNANHIBIT = 1
-TEEM_DIO = 0
-
SIGH = 1
TEEM_ZLIB.IPATH ?=
Modified: teem/trunk/src/make/darwin.mk
===================================================================
--- teem/trunk/src/make/darwin.mk 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/make/darwin.mk 2025-08-16 00:04:55 UTC (rev 7283)
@@ -50,9 +50,6 @@
endif
endif
-TEEM_QNANHIBIT = 1
-TEEM_DIO = 0
-
TEEM_ZLIB.IPATH ?=
TEEM_ZLIB.LPATH ?=
Modified: teem/trunk/src/make/irix6.mk
===================================================================
--- teem/trunk/src/make/irix6.mk 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/make/irix6.mk 2025-08-16 00:04:55 UTC (rev 7283)
@@ -42,9 +42,6 @@
endif
endif
-TEEM_QNANHIBIT = 0
-TEEM_DIO = 1
-
TEEM_ZLIB.IPATH ?=
TEEM_ZLIB.LPATH ?=
Modified: teem/trunk/src/make/linux.mk
===================================================================
--- teem/trunk/src/make/linux.mk 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/make/linux.mk 2025-08-16 00:04:55 UTC (rev 7283)
@@ -28,8 +28,6 @@
SHARED_LDFLAG = -shared
SHARED_RPATH = -Wl,-rpath -Wl,
-TEEM_QNANHIBIT = 1
-TEEM_DIO = 0
ifeq ($(SUBARCH),ia64)
ARCH_CFLAG = -fPIC -W -Wall
ARCH_LDFLAG =
Modified: teem/trunk/src/make/netbsd.mk
===================================================================
--- teem/trunk/src/make/netbsd.mk 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/make/netbsd.mk 2025-08-16 00:04:55 UTC (rev 7283)
@@ -27,8 +27,6 @@
SHARED_LDFLAG = -shared
SHARED_RPATH = -Wl,-rpath -Wl,
-TEEM_QNANHIBIT = 1
-TEEM_DIO = 0
ifeq ($(SUBARCH),ia64)
ARCH_CFLAG = -fPIC -W -Wall
ARCH_LDFLAG =
Modified: teem/trunk/src/make/solaris.mk
===================================================================
--- teem/trunk/src/make/solaris.mk 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/make/solaris.mk 2025-08-16 00:04:55 UTC (rev 7283)
@@ -28,9 +28,6 @@
ARCH_CFLAG =
ARCH_LDFLAG =
-TEEM_QNANHIBIT = 1
-TEEM_DIO = 0
-
TEEM_ZLIB.IPATH ?=
TEEM_ZLIB.LPATH ?=
Modified: teem/trunk/src/nrrd/format.c
===================================================================
--- teem/trunk/src/nrrd/format.c 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/nrrd/format.c 2025-08-16 00:04:55 UTC (rev 7283)
@@ -112,7 +112,6 @@
static const NrrdFormat _nrrdFormatUnknown = {"unknown",
AIR_FALSE, /* isImage */
AIR_TRUE, /* readable */
- AIR_FALSE, /* usesDIO */
_nrrdFormatUnknown_available,
_nrrdFormatUnknown_nameLooksLike,
_nrrdFormatUnknown_fitsInto,
Modified: teem/trunk/src/nrrd/formatEPS.c
===================================================================
--- teem/trunk/src/nrrd/formatEPS.c 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/nrrd/formatEPS.c 2025-08-16 00:04:55 UTC (rev 7283)
@@ -200,7 +200,6 @@
const NrrdFormat _nrrdFormatEPS = {"EPS",
AIR_FALSE, /* isImage */
AIR_FALSE, /* readable */
- AIR_FALSE, /* usesDIO */
_nrrdFormatEPS_available,
_nrrdFormatEPS_nameLooksLike,
_nrrdFormatEPS_fitsInto,
Modified: teem/trunk/src/nrrd/formatNRRD.c
===================================================================
--- teem/trunk/src/nrrd/formatNRRD.c 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/nrrd/formatNRRD.c 2025-08-16 00:04:55 UTC (rev 7283)
@@ -813,7 +813,6 @@
const NrrdFormat _nrrdFormatNRRD = {"NRRD",
AIR_FALSE, /* isImage */
AIR_TRUE, /* readable */
- AIR_TRUE, /* usesDIO */
_nrrdFormatNRRD_available,
_nrrdFormatNRRD_nameLooksLike,
_nrrdFormatNRRD_fitsInto,
Modified: teem/trunk/src/nrrd/formatPNG.c
===================================================================
--- teem/trunk/src/nrrd/formatPNG.c 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/nrrd/formatPNG.c 2025-08-16 00:04:55 UTC (rev 7283)
@@ -622,9 +622,8 @@
}
const NrrdFormat _nrrdFormatPNG = {"PNG",
- AIR_TRUE, /* isImage */
- AIR_TRUE, /* readable */
- AIR_FALSE, /* usesDIO */
+ AIR_TRUE, /* isImage */
+ AIR_TRUE, /* readable */
_nrrdFormatPNG_available,
_nrrdFormatPNG_nameLooksLike,
_nrrdFormatPNG_fitsInto,
Modified: teem/trunk/src/nrrd/formatPNM.c
===================================================================
--- teem/trunk/src/nrrd/formatPNM.c 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/nrrd/formatPNM.c 2025-08-16 00:04:55 UTC (rev 7283)
@@ -330,9 +330,8 @@
}
const NrrdFormat _nrrdFormatPNM = {"PNM",
- AIR_TRUE, /* isImage */
- AIR_TRUE, /* readable */
- AIR_FALSE, /* usesDIO */
+ AIR_TRUE, /* isImage */
+ AIR_TRUE, /* readable */
_nrrdFormatPNM_available,
_nrrdFormatPNM_nameLooksLike,
_nrrdFormatPNM_fitsInto,
Modified: teem/trunk/src/nrrd/formatText.c
===================================================================
--- teem/trunk/src/nrrd/formatText.c 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/nrrd/formatText.c 2025-08-16 00:04:55 UTC (rev 7283)
@@ -385,7 +385,6 @@
const NrrdFormat _nrrdFormatText = {"text",
AIR_FALSE, /* isImage */
AIR_TRUE, /* readable */
- AIR_FALSE, /* usesDIO */
_nrrdFormatText_available,
_nrrdFormatText_nameLooksLike,
_nrrdFormatText_fitsInto,
Modified: teem/trunk/src/nrrd/formatVTK.c
===================================================================
--- teem/trunk/src/nrrd/formatVTK.c 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/nrrd/formatVTK.c 2025-08-16 00:04:55 UTC (rev 7283)
@@ -393,7 +393,6 @@
const NrrdFormat _nrrdFormatVTK = {"VTK",
AIR_FALSE, /* isImage */
AIR_TRUE, /* readable */
- AIR_FALSE, /* usesDIO */
_nrrdFormatVTK_available,
_nrrdFormatVTK_nameLooksLike,
_nrrdFormatVTK_fitsInto,
Modified: teem/trunk/src/nrrd/newformat.txt
===================================================================
--- teem/trunk/src/nrrd/newformat.txt 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/nrrd/newformat.txt 2025-08-16 00:04:55 UTC (rev 7283)
@@ -7,8 +7,7 @@
added #define NRRD_EXT_VTK ".vtk"
arraysNrrd.c:
-augmented nrrdFormatIsAvailable[], nrrdFormatIsImage[],
- and _nrrdFormatUsesDIO[]
+augmented nrrdFormatIsAvailable[] and nrrdFormatIsImage[]
enumsNrrd.c:
augmented _nrrdFormatStr[], _nrrdFormatStrEqv[], _nrrdFormatValEqv[],
Modified: teem/trunk/src/nrrd/nrrd.h
===================================================================
--- teem/trunk/src/nrrd/nrrd.h 2025-08-15 23:43:32 UTC (rev 7282)
+++ teem/trunk/src/nrrd/nrrd.h 2025-08-16 00:04:55 UTC (rev 7283)
@@ -230,8 +230,7 @@
int isImage, /* this format is intended solely for "2D" images, which
controls the invocation of nrrdAxesInsert()
if nrrdStateGrayscaleImage3D */
- readable, /* we can read as well as write this format */
- usesDIO; /* this format can use Direct IO */
+ readable; /* we can read as well as write this format */
/* tests if this format is currently available in this build */
int (*available)(void);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|