Skip to content

GDALVersionInfo: provide information about floating-point features #14717

@dbaston

Description

@dbaston

Feature description

I'm comparing differences in gdalwarp output between two machines that are using the same version of GDAL 3.13 but with different architectures. I wondered if the differences could be related to differences in the use of intrinsics, but I don't see a way to get this information from gdal.VersionInfo('BUILD_INFO').

I experimented with a patch to GDALVersionInfo along the following lines:

        osBuildInfo += "FLOATING_POINT_OPTIONS="
#ifdef HAVE_SSE_AT_COMPILE_TIME
        "SSE: YES"
#else
        "SSE: NO"
#endif
#ifdef HAVE_SSSE3_AT_COMPILE_TIME
        ", SSSE3: YES"
#else
        ", SSSE3: NO"
#endif
#ifdef HAVE_AVX_AT_COMPILE_TIME
        ", AVX: YES"
#else
        ", AVX: NO"
#endif

But the various capabilities don't seem to be consistently exposed as definitions that can be picked up in this way. For example, CMake sets a variable GDAL_AVX2_FLAG if AVX2 support is detected, but there is no corresponding definition available to the preprocessor.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementnot for AI loversSee https://gdal.org/en/stable/community/ai_tool_policy.html

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions