octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HAVE_FFTW macro


From: Daniel J Sebald
Subject: Re: HAVE_FFTW macro
Date: Sun, 17 Mar 2013 04:03:39 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 03/17/2013 03:47 AM, John W. Eaton wrote:
On 03/17/2013 04:33 AM, Daniel J Sebald wrote:
On 03/16/2013 11:20 PM, Rik wrote:
On 03/16/2013 12:52 AM, address@hidden wrote:
Is something being overlooked there?
What does

octave_config_info ("features")

show? This is a list of all the HAVE_X macros, with the common "HAVE_"
part omitted. On my system, it has FFTW3, but not FFTW, so it looks
like the testif check is wrong.
Dan,

The problem seems to be that not all #defines are captured in the new
"features" keyword. The definition for HAVE_FFTW is in configure.ac in
the
AH_BOTTOM macro which means it is copied to the bottom of config.h.

/* Octave is currently unable to use FFTW unless both float
and double versions are available. */
#if defined (HAVE_FFTW3)&& defined (HAVE_FFTW3F)
#define HAVE_FFTW
#endif

I wasn't following closely what jwe did when he added the "features"
keyword, but hopefully it is simple to fix.

OK, thanks. Probably in over my head had I looked for that. But now that
you point out the test above I think I see what the problem is. The test
is "defined". Both of those variables appear to be defined, if I'm
following correctly, but they are given the value 0, i.e.,

FFTW3 = 0
FFTW3F = 0

So maybe either the test should be something other than defined() and
instead check the value of the FFTW3, FFTW3F, or FFTW3 and FFTW3F should
be left undefined rather than setting them to 0.

Dan

Does your generated config.h file really have

#define HAVE_FFTW3 0

? Or is it

/* #undef HAVE_FFTW3 */

The latter is what I have.


OK, you're right:

/* Define to 1 if FFTW3 is available. */
/* #undef HAVE_FFTW3 */

So a 0 in the "features" config info means not defined but it is a possible feature?

Is the "undef" important. The commented-out undef sort of suggests the norm is to have HAVE_X defined whereby uncommenting will cause HAVE_X to be undefined. That is, instead of uncommenting the line, the action is to change the line to

#define HAVE_FFTW3 1

Why not have:

/* Define to 1 if FFTW3 is available. */
/* #define HAVE_FFTW3 1 */


Not super important.


Anyway, I think I have a fix for the original problem. Once I'm doing
testing, I'll push it.

OK, I'll try it out in the morning.

Dan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]