![]() |
Blitz Support : |
From: Julian Cummings (cummings_at_[hidden])
Date: 2004-08-04 23:10:50
Hello Eddie,
>
> Dear Blitz-support,
>
> I have successfully installed and used Blitz++ with Visual
> Studio.NET 2003
> -- it's a very useful product when we previously used Fortran
> 90 for our array handling.
Glad to hear that!
>
> I have a couple of minor problems though, one of which
> (compilation error C2064 in extract.cpp from the test suite)
> I have reported to blitz-bugs. I don't know if the next
> problem is a bug or not!
I don't recall seeing the message to blitz-bugs. Another way to report bugs
is to go to http://www.sourceforge.net/projects/blitz and click on Bugs.
Anyway, was this problem in extract.cpp pretty recent? I found a recent
change to the blitz/array-impl.h header file that appeared to be the root of
this problem. The argument type expected by operator[] for multicomponent
Arrays had been changed from int to unsigned. This means that passing an
int fails to match exactly, and the compiler was picking up a templated
version of operator[] instead. I changed this back to an argument type of
int, and now extract.cpp compiles with only a couple of warnings about
conversions from the blitz::IndexPlaceholder type to float type, which are
harmless. I suppose if we really need to have operator[] take an unsigned
int, we will have to separately declare another overloaded version of
operator[], but I left that alone for now.
>
> When running all the test programs, I get an assertion
> failure message in 'exprctor' in the test suite. This occurs
> in both the 0.7 release and yesterday's (3 August) CVS
> checkout. The assert fires in bzdebug.h in the routine below:
>
>
> inline void endCheckAssert()
> {
> assert(assertFailMode == true);
> assertFailMode = false;
> if (assertFailCount == 0)
> {
> cerr << "Assert check failed!" << endl;
> assert(0);
> }
> }
>
>
> As far as I can tell, assertFailCount is never incremented
> and hence the assertion. Is this an expected assertion, or is
> my installation not working properly?
>
Thank you very much for reporting this problem. It revealed a bigger
problem that I had not noticed. All of the testsuite codes use blitz assert
macros that only work when the preprocessor macro BZ_DEBUG is defined. I
had forgotten to define this macro in the project files for these testsuite
codes. I have now gone through and done that for every project file in both
the Debug and Release configurations. For the blitz project file that
builds blitz.lib, I define this macro only in the Debug configuration, which
is what you should do for a typical blitz application code as well.
Normally, you will want to disable these blitz assertions in Release mode,
but the testsuite codes are special.
I have replaced the Blitz-VS.NET.zip archive with a new version. I also
fixed a little problem with the path to the config.h file from my previous
cvs commit, so this file will now extract into the blitz subdirectory as it
should.
Regards, Julian C.
Dr. Julian C. Cummings Office: PB-111
Caltech/CACR, MC 158-79 Phone: 626-395-2543
1200 E. California Blvd. Fax: 626-584-5917
Pasadena, CA 91125