Skip to content

Commit

Permalink
Merge branch 'upstream-VXL' into update-vxl-20241227
Browse files Browse the repository at this point in the history
* upstream-VXL:
  VXL 2024-12-27 (b852f514)
  • Loading branch information
hjmjohnson committed Dec 27, 2024
2 parents 42e9ccb + a0c6ee3 commit 9e62486
Show file tree
Hide file tree
Showing 499 changed files with 20,732 additions and 13,005 deletions.
4 changes: 1 addition & 3 deletions Modules/ThirdParty/VNL/src/vxl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
cmake_minimum_required(VERSION 3.16.3)
if(CMAKE_VERSION VERSION_LESS 3.12.0)
cmake_policy(VERSION ${CMAKE_VERSION})
else()
cmake_policy(VERSION 3.10.2...3.20.3)
endif()

if(NOT CMAKE_CXX_STANDARD)
Expand Down Expand Up @@ -67,7 +65,7 @@ foreach(p
endforeach()

project(VXL #Project name must be all caps to have properly generated VXL_VERSION_* variables
VERSION 5.3.0.0 # defines #MAJOR,MINOR,PATCH,TWEAK}
VERSION 5.5.1.0 # defines #MAJOR,MINOR,PATCH,TWEAK}
DESCRIPTION "A multi-platform collection of C++ software libraries for Computer Vision and Image Understanding."
LANGUAGES CXX C)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,3 @@ else()
endif ()
endif()
endif()

Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,3 @@ if(APPLE AND DC1394_FOUND)
"-framework CoreServices"
"-framework IOKit" )
endif()





Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ if(GEOTIFF_INCLUDE_DIR)
set( GEOTIFF_LIBRARIES ${GEOTIFF_LIBRARY} )
endif()
endif()

Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,3 @@ endif()
if(SIMVOLEON_LIBRARY)
set( SIMVOLEON_FOUND "YES" )
endif()

Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,3 @@ if( WIN32 )
)

endif()


Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ If you are adding some new functionality to VXL and you need a third party libra
that VXL can depend on this additional library) then you can temporarily add the file to the NewCMake subdirectory.
Please also submit it to CMake at [email protected], and delete it from the VXL repository when the next
version of CMake is widely available.


Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#include <iostream>

int main()
int
main()
{
#if __cplusplus >= VXL_CXX_TEST_VERSION
std::cout << __cplusplus << ">=" << VXL_CXX_TEST_VERSION << std::endl;
return 0;
#else
#error "VERSION TEST FAILED" VXL_CXX_TEST_VERSION
std::cout << __cplusplus << ">=" << VXL_CXX_TEST_VERSION << std::endl;
return 1;
#endif
#if __cplusplus >= VXL_CXX_TEST_VERSION
std::cout << __cplusplus << ">=" << VXL_CXX_TEST_VERSION << std::endl;
return 0;
#else
# error "VERSION TEST FAILED" VXL_CXX_TEST_VERSION
std::cout << __cplusplus << ">=" << VXL_CXX_TEST_VERSION << std::endl;
return 1;
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,26 @@

#ifdef VXL_UNISTD_USLEEP_IS_VOID
// VXL_UNISTD_USLEEP_IS_VOID is set to 1 if this test fails
#include <unistd.h>
# include <unistd.h>

int main() { int x = usleep(0); return x*0; }
int
main()
{
int x = usleep(0);
return x * 0;
}
#endif // VXL_UNISTD_USLEEP_IS_VOID
//-------------------------------------
#ifdef VCL_NUMERIC_LIMITS_HAS_INFINITY
// Does vcl_numeric_limits<float>::has_infinity == 1?

// Several versions of gcc (3.0, 3.1, and 3.2) come with a
// numeric_limits that reports that they have no infinity.
#include <limits>
int main() {
return std::numeric_limits<double>::has_infinity &&
std::numeric_limits<float>::has_infinity ? 0 : 1;
# include <limits>
int
main()
{
return std::numeric_limits<double>::has_infinity && std::numeric_limits<float>::has_infinity ? 0 : 1;
}
#endif // VCL_NUMERIC_LIMITS_HAS_INFINITY

Expand All @@ -29,30 +35,33 @@ int main() {
// functional. (It can't be cast to a double, for example.)

// CHAR_BIT is the number of bits per char.
#include <climits>
#ifndef CHAR_BIT
# define CHAR_BIT 8
#endif
# include <climits>
# ifndef CHAR_BIT
# define CHAR_BIT 8
# endif

#include "config.h"
# include "config.h"

#if INTEGRAL_TYPE
double cast( THE_TYPE a, unsigned THE_TYPE b, signed THE_TYPE c )
# if INTEGRAL_TYPE
double
cast(THE_TYPE a, unsigned THE_TYPE b, signed THE_TYPE c)
{
return double( a ) + double( b ) + double( c );
return double(a) + double(b) + double(c);
}
#else // INTEGRAL_TYPE
double cast( THE_TYPE a )
# else // INTEGRAL_TYPE
double
cast(THE_TYPE a)
{
return double( a );
return double(a);
}
#endif // INTEGRAL_TYPE
# endif // INTEGRAL_TYPE

// These declarations conflict unless the sizes match.
extern int (*verify_size)[sizeof(THE_TYPE) * CHAR_BIT];
extern int (*verify_size)[THE_SIZE];

int main()
int
main()
{
return 0;
}
Expand All @@ -63,18 +72,19 @@ int main()
#ifdef VCL_HAS_LFS

// Return 1 if compiler has #define-switchable Large File Support
#define _LARGEFILE_SOURCE
#define _FILE_OFFSET_BITS 64
# define _LARGEFILE_SOURCE
# define _FILE_OFFSET_BITS 64

#include <fstream>
#include <iostream>
# include <fstream>
# include <iostream>

int main(int argc, char * argv[])
int
main(int argc, char * argv[])
{
if( sizeof(std::streamoff)==8 )
return 0 ;
else
return 1;
if (sizeof(std::streamoff) == 8)
return 0;
else
return 1;
}

#endif // VCL_HAS_LFS
Expand All @@ -84,39 +94,50 @@ int main(int argc, char * argv[])
#ifdef VXL_HAS_DBGHELP_H

// This is a Windows header, and needs windows.h included first to make it compile properly.
#include <Windows.h>
#include <DbgHelp.h>
# include <Windows.h>
# include <DbgHelp.h>

int main() { MINIDUMP_EXCEPTION_INFORMATION dummy; return 0; }
int
main()
{
MINIDUMP_EXCEPTION_INFORMATION dummy;
return 0;
}
#endif // VXL_HAS_DBGHELP_H

//-------------------------------------

//-------------------------------------
#ifdef VXL_HAS_WIN_WCHAR_T

#ifdef _WCHAR_T_DEFINED
#include <cwchar>
int main()
# ifdef _WCHAR_T_DEFINED
# include <cwchar>
int
main()
{
wchar_t buf [10];
wchar_t buf[10];
buf[0] = L'1';
buf[1] = L'\0';
return 0;
}
#else
int main() { return 1; }
#endif
# else
int
main()
{
return 1;
}
# endif

#endif

//-------------------------------------

#ifdef VXL_HAS_MM_MALLOC
#include <emmintrin.h>
int main()
# include <emmintrin.h>
int
main()
{
void* x = _mm_malloc(4*sizeof(float),16);
void * x = _mm_malloc(4 * sizeof(float), 16);
_mm_free(x);
return 0;
}
Expand All @@ -125,10 +146,11 @@ int main()
//-------------------------------------

#ifdef VXL_HAS_ALIGNED_MALLOC
#include <malloc.h>
int main()
# include <malloc.h>
int
main()
{
void* x = _aligned_malloc(4*sizeof(float),16);
void * x = _aligned_malloc(4 * sizeof(float), 16);
_aligned_free(x);
return 0;
}
Expand All @@ -137,10 +159,11 @@ int main()
//-------------------------------------

#ifdef VXL_HAS_MINGW_ALIGNED_MALLOC
#include <malloc.h>
int main()
# include <malloc.h>
int
main()
{
void* x = __mingw_aligned_malloc(4*sizeof(float),16);
void * x = __mingw_aligned_malloc(4 * sizeof(float), 16);
__mingw_aligned_free(x);
return 0;
}
Expand All @@ -149,10 +172,11 @@ int main()
//-------------------------------------

#ifdef VXL_HAS_POSIX_MEMALIGN
#include <cstdlib>
int main()
# include <cstdlib>
int
main()
{
void* x = memalign(16,4*sizeof(float));
void * x = memalign(16, 4 * sizeof(float));
free(x);
return 0;
}
Expand All @@ -161,18 +185,19 @@ int main()
//-------------------------------------

#if defined(VXL_HAS_SSE2_HARDWARE_SUPPORT) || defined(VXL_SSE2_HARDWARE_SUPPORT_POSSIBLE)
#include <emmintrin.h>
int main()
# include <emmintrin.h>
int
main()
{
//try to do some sse2 calculations
double d_a[] = { 6.75, 3.42 };
double d_b[] = { 2.3, 9.2 };
double res[2] = {0.0};
// try to do some sse2 calculations
double d_a[] = { 6.75, 3.42 };
double d_b[] = { 2.3, 9.2 };
double res[2] = { 0.0 };

__m128d z;
z = _mm_mul_pd(_mm_loadu_pd(d_a),_mm_loadu_pd(d_b));
z = _mm_mul_pd(_mm_loadu_pd(d_a), _mm_loadu_pd(d_b));

_mm_storeu_pd(res,z);
_mm_storeu_pd(res, z);

return 0;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

void vxl_static_test_function(int i);
void
vxl_static_test_function(int i);

void vxl_shared_test_function(int i)
void
vxl_shared_test_function(int i)
{
vxl_static_test_function(i);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

void vxl_static_test_function(int i)
{
}
void
vxl_static_test_function(int i)
{}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ endmacro()
# not its default value; otherwise, the relative path in
# the vxl source tree is used.
# DISABLE_MSVC_MP Disable automatic addition of the "/MP" flag in MSVC
# builds. Avoids MSVC warning C5102: ignoring invalid
# builds. Avoids MSVC warning C5102: ignoring invalid
# command-line macro definition '/MP'
#
function( vxl_add_library )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ doxygen_makeall.cmake
4) Creates a directory ${DOXYGEN_OUTPUT_DIR}/html/${library}/html
5) Runs doxygen using the parameter file ${CMAKE_BINARY_DIR}/doxy/output/doxyfile.${libname}
6) Creates a global index, which expects data for each library to be in somewhere like:
obj/doxy/html/core/vnl/html/index.html
obj/doxy/html/core/vnl/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
<link href="tabs.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<body>
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ testlib_main(int argc, char * argv[])
<< "----------------------------------------\n"
<< std::flush;

int result = testlib_run_test_unit(i, argc, argv);
const int result = testlib_run_test_unit(i, argc, argv);

std::cout << "----------------------------------------\n"
<< testlib_test_name_[i] << " returned " << result << ' ' << (result == 0 ? "(PASS)" : "(FAIL)") << '\n'
Expand Down
Loading

0 comments on commit 9e62486

Please sign in to comment.