graphics/colmap: update to 3.3

Changes:	https://github.com/colmap/colmap/blob/3.3/CHANGELOG.txt
This commit is contained in:
Jan Beich 2017-12-05 20:52:57 +00:00
parent e64edf4309
commit 175bd94a98
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=455621
4 changed files with 30 additions and 135 deletions

View file

@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= colmap
DISTVERSION= 3.2
PORTREVISION= 4
DISTVERSION= 3.3
CATEGORIES= graphics
MAINTAINER= jbeich@FreeBSD.org

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1504347098
SHA256 (colmap-colmap-3.2_GH0.tar.gz) = 7d86d3a0a68efdbcdde7bf4f24fdf40f695e61454c8497d519e9c823d148e424
SIZE (colmap-colmap-3.2_GH0.tar.gz) = 5674070
TIMESTAMP = 1511304389
SHA256 (colmap-colmap-3.3_GH0.tar.gz) = 7fba029a14a68d827ebd57383a8c6271d259c0edbdee7f1e4f0874477f1c3e99
SIZE (colmap-colmap-3.3_GH0.tar.gz) = 5683574

View file

@ -1,76 +0,0 @@
pba: unbreak for GCC + libc++
In file included from src/./ext/PBA/pba.h:50:0,
from src/./optim/bundle_adjustment.h:29,
from src/./util/option_manager.h:34,
from src/./ui/bundle_adjustment_widget.h:25,
from src/ui/bundle_adjustment_widget.cc:17:
src/./ext/PBA/ConfigBA.h:24:12: error: 'vector' is already declared in this scope
using std::vector;
^~~~~~
--- src/ext/PBA/ConfigBA.h.orig 2016-12-07 13:47:54 UTC
+++ src/ext/PBA/ConfigBA.h
@@ -21,7 +21,6 @@
#ifndef CONFIG_BA_H
#define CONFIG_BA_H
#include <vector>
-using std::vector;
namespace pba {
@@ -181,7 +180,7 @@ class ConfigBA {
bool __matlab_format_stat;
char* __stat_filename;
const char* __driver_output;
- vector<float> __bundle_records;
+ std::vector<float> __bundle_records;
double __timer_record[NUM_TIMER];
int __num_cpu_thread_all;
int __num_cpu_thread[NUM_FUNC];
--- src/ext/PBA/SparseBundleCPU.h.orig 2016-12-07 13:47:54 UTC
+++ src/ext/PBA/SparseBundleCPU.h
@@ -146,7 +146,7 @@ class SparseBundleCPU : public ParallelB
SparseBundleCPU(const int num_threads);
typedef avec<Float> VectorF;
- typedef vector<int> VectorI;
+ typedef std::vector<int> VectorI;
typedef float float_t;
protected: // cpu data
@@ -204,8 +204,8 @@ class SparseBundleCPU : public ParallelB
VectorF _cuCameraQListW;
protected:
- bool ProcessIndexCameraQ(vector<int>& qmap, vector<int>& qlist);
- void ProcessWeightCameraQ(vector<int>& cpnum, vector<int>& qmap, Float* qmapw,
+ bool ProcessIndexCameraQ(std::vector<int>& qmap, std::vector<int>& qlist);
+ void ProcessWeightCameraQ(std::vector<int>& cpnum, std::vector<int>& qmap, Float* qmapw,
Float* qlistw);
protected: // internal functions
--- src/ext/PBA/SparseBundleCU.h.orig 2016-12-07 13:47:54 UTC
+++ src/ext/PBA/SparseBundleCU.h
@@ -40,7 +40,7 @@ class SparseBundleCU : public ParallelBA
const int* _camera_idx;
const int* _point_idx;
const int* _focal_mask;
- vector<float> _imgpt_datax;
+ std::vector<float> _imgpt_datax;
////////////////////////
float _projection_sse; // sumed square error
protected: // cuda data
@@ -84,9 +84,9 @@ class SparseBundleCU : public ParallelBA
CuTexImage _cuCameraQListW;
protected:
- bool ProcessIndexCameraQ(vector<int>& qmap, vector<int>& qlist);
- void ProcessWeightCameraQ(vector<int>& cpnum, vector<int>& qmap,
- vector<float>& qmapw, vector<float>& qlistw);
+ bool ProcessIndexCameraQ(std::vector<int>& qmap, std::vector<int>& qlist);
+ void ProcessWeightCameraQ(std::vector<int>& cpnum, std::vector<int>& qmap,
+ std::vector<float>& qmapw, std::vector<float>& qlistw);
protected: // internal functions
int GetParameterLength();

View file

@ -1,6 +1,6 @@
build: don't force SSE2/AVX, enable at runtime instead
--- CMakeLists.txt.orig 2017-05-22 13:02:37 UTC
--- CMakeLists.txt.orig 2017-11-21 22:46:29 UTC
+++ CMakeLists.txt
@@ -17,8 +17,6 @@ include(CheckCXXCompilerFlag)
# the CMake policies in this file
@ -17,36 +17,37 @@ build: don't force SSE2/AVX, enable at runtime instead
+option(SIMD_ENABLED "Whether to enable SIMD optimizations" ON)
option(OPENMP_ENABLED "Whether to enable OpenMP" ON)
option(LTO_ENABLED "Whether to enable link-time optimization" ON)
option(IPO_ENABLED "Whether to enable interprocedural optimization" ON)
option(CUDA_ENABLED "Whether to enable CUDA, if available" ON)
--- src/ext/VLFeat/CMakeLists.txt.orig 2017-09-02 10:11:38 UTC
--- src/ext/VLFeat/CMakeLists.txt.orig 2017-11-21 22:46:29 UTC
+++ src/ext/VLFeat/CMakeLists.txt
@@ -1,14 +1,25 @@
-if(IS_GNU OR IS_CLANG)
- if(NOT HAS_AVX_EXTENSION)
- add_definitions(-DVL_DISABLE_AVX)
- endif()
+set(VLFEAT_SOURCE_FILES)
@@ -70,16 +70,16 @@ set(VLFEAT_SOURCE_FILES
vlad.h)
- if(NOT HAS_SSE2_EXTENSION)
- add_definitions(-DVL_DISABLE_SSE2)
- endif()
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "[ix].?86|amd64|AMD64")
+ set(IS_X86 TRUE)
+endif()
if(IS_GNU OR IS_CLANG)
- if(HAS_AVX_EXTENSION)
- list(APPEND VLFEAT_SOURCE_FILES
+ if(SIMD_ENABLED AND CMAKE_SYSTEM_PROCESSOR MATCHES "[ix].?86|amd64|AMD64")
+ set(AVX_SOURCES
mathop_avx.c
mathop_avx.h)
else()
add_definitions(-DVL_DISABLE_AVX)
endif()
- if(HAS_SSE2_EXTENSION)
- list(APPEND VLFEAT_SOURCE_FILES
+ if(SIMD_ENABLED AND CMAKE_SYSTEM_PROCESSOR MATCHES "[ix].?86|amd64|AMD64")
+ set(SSE2_SOURCES
mathop_sse2.c
mathop_sse2.h
imopv_sse2.c
@@ -88,8 +88,12 @@ if(IS_GNU OR IS_CLANG)
add_definitions(-DVL_DISABLE_SSE2)
endif()
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SSE_FLAGS}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SSE_FLAGS}")
+if(SIMD_ENABLED AND IS_X86 AND NOT IS_MSVC)
+ set(SSE2_SOURCES
+ imopv_sse2.c
+ imopv_sse2.h
+ mathop_sse2.c
+ mathop_sse2.h)
+ set(AVX_SOURCES
+ mathop_avx.c
+ mathop_avx.h)
+
+ list(APPEND VLFEAT_SOURCE_FILES ${AVX_SOURCES} ${SSE2_SOURCES})
+
+ set_source_files_properties(${AVX_SOURCES}
@ -56,32 +57,3 @@ build: don't force SSE2/AVX, enable at runtime instead
else()
add_definitions(-DVL_DISABLE_AVX)
add_definitions(-DVL_DISABLE_SSE2)
@@ -18,7 +29,7 @@ if(NOT OPENMP_ENABLED OR NOT OPENMP_FOUND)
add_definitions(-DVL_DISABLE_OPENMP)
endif()
-set(VLFEAT_SOURCE_FILES
+list(APPEND VLFEAT_SOURCE_FILES
aib.c
aib.h
array.c
@@ -52,8 +63,6 @@ set(VLFEAT_SOURCE_FILES
ikmeans_lloyd.tc
imopv.c
imopv.h
- imopv_sse2.c
- imopv_sse2.h
kdtree.c
kdtree.h
kmeans.c
@@ -64,10 +73,6 @@ set(VLFEAT_SOURCE_FILES
liop.h
mathop.c
mathop.h
- mathop_avx.c
- mathop_avx.h
- mathop_sse2.c
- mathop_sse2.h
mser.c
mser.h
pgm.c