162968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/configure misc/build/vigra1.6.0/configure 262968b57SPedro Giffuni--- misc/vigra1.6.0/configure 2008-08-13 08:15:32.000000000 -0500 362968b57SPedro Giffuni+++ misc/build/vigra1.6.0/configure 2012-09-19 17:30:24.000000000 -0500 462968b57SPedro Giffuni@@ -7843,7 +7843,7 @@ kfreebsd*-gnu) 562968b57SPedro Giffuni ;; 662968b57SPedro Giffuni 762968b57SPedro Giffuni freebsd*) 862968b57SPedro Giffuni- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 962968b57SPedro Giffuni+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` 1062968b57SPedro Giffuni version_type=freebsd-$objformat 1162968b57SPedro Giffuni case $version_type in 1262968b57SPedro Giffuni freebsd-elf*) 1362968b57SPedro Giffuni@@ -11504,7 +11504,7 @@ kfreebsd*-gnu) 1462968b57SPedro Giffuni ;; 1562968b57SPedro Giffuni 1662968b57SPedro Giffuni freebsd*) 1762968b57SPedro Giffuni- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 1862968b57SPedro Giffuni+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` 1962968b57SPedro Giffuni version_type=freebsd-$objformat 2062968b57SPedro Giffuni case $version_type in 2162968b57SPedro Giffuni freebsd-elf*) 2262968b57SPedro Giffuni@@ -14616,7 +14616,7 @@ kfreebsd*-gnu) 2362968b57SPedro Giffuni ;; 2462968b57SPedro Giffuni 2562968b57SPedro Giffuni freebsd*) 2662968b57SPedro Giffuni- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 2762968b57SPedro Giffuni+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` 2862968b57SPedro Giffuni version_type=freebsd-$objformat 2962968b57SPedro Giffuni case $version_type in 3062968b57SPedro Giffuni freebsd-elf*) 3162968b57SPedro Giffuni@@ -16958,7 +16958,7 @@ kfreebsd*-gnu) 3262968b57SPedro Giffuni ;; 3362968b57SPedro Giffuni 3462968b57SPedro Giffuni freebsd*) 3562968b57SPedro Giffuni- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 3662968b57SPedro Giffuni+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` 3762968b57SPedro Giffuni version_type=freebsd-$objformat 3862968b57SPedro Giffuni case $version_type in 3962968b57SPedro Giffuni freebsd-elf*) 4062968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/array_vector.hxx misc/build/vigra1.6.0/include/vigra/array_vector.hxx 4162968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/array_vector.hxx 2008-08-13 08:15:34.000000000 -0500 4262968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/array_vector.hxx 2012-09-19 17:30:24.000000000 -0500 4362968b57SPedro Giffuni@@ -578,7 +578,38 @@ public: 4462968b57SPedro Giffuni iterator insert(iterator p, size_type n, value_type const & v); 4562968b57SPedro Giffuni 4662968b57SPedro Giffuni template <class InputIterator> 4762968b57SPedro Giffuni- iterator insert(iterator p, InputIterator i, InputIterator iend); 4862968b57SPedro Giffuni+ iterator insert(iterator p, InputIterator i, InputIterator iend) 4962968b57SPedro Giffuni+ { 5062968b57SPedro Giffuni+ difference_type n = iend - i; 5162968b57SPedro Giffuni+ difference_type pos = p - begin(); 5262968b57SPedro Giffuni+ size_type new_size = size() + n; 5362968b57SPedro Giffuni+ if(new_size >= capacity_) 5462968b57SPedro Giffuni+ { 5562968b57SPedro Giffuni+ pointer new_data = reserve_raw(new_size); 5662968b57SPedro Giffuni+ std::uninitialized_copy(begin(), p, new_data); 5762968b57SPedro Giffuni+ std::uninitialized_copy(i, iend, new_data + pos); 5862968b57SPedro Giffuni+ std::uninitialized_copy(p, end(), new_data + pos + n); 5962968b57SPedro Giffuni+ deallocate(data_, size_); 6062968b57SPedro Giffuni+ capacity_ = new_size; 6162968b57SPedro Giffuni+ data_ = new_data; 6262968b57SPedro Giffuni+ } 6362968b57SPedro Giffuni+ else if(pos + n >= size_) 6462968b57SPedro Giffuni+ { 6562968b57SPedro Giffuni+ size_type diff = pos + n - size_; 6662968b57SPedro Giffuni+ std::uninitialized_copy(p, end(), end() + diff); 6762968b57SPedro Giffuni+ std::uninitialized_copy(iend - diff, iend, end()); 6862968b57SPedro Giffuni+ std::copy(i, iend - diff, p); 6962968b57SPedro Giffuni+ } 7062968b57SPedro Giffuni+ else 7162968b57SPedro Giffuni+ { 7262968b57SPedro Giffuni+ size_type diff = size_ - (pos + n); 7362968b57SPedro Giffuni+ std::uninitialized_copy(end() - n, end(), end()); 7462968b57SPedro Giffuni+ std::copy_backward(p, p + diff, end()); 7562968b57SPedro Giffuni+ std::copy(i, iend, p); 7662968b57SPedro Giffuni+ } 7762968b57SPedro Giffuni+ size_ = new_size; 7862968b57SPedro Giffuni+ return begin() + pos; 7962968b57SPedro Giffuni+ } 8062968b57SPedro Giffuni 8162968b57SPedro Giffuni iterator erase(iterator p); 8262968b57SPedro Giffuni 8362968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/basicimage.hxx misc/build/vigra1.6.0/include/vigra/basicimage.hxx 8462968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/basicimage.hxx 2008-08-13 08:15:34.000000000 -0500 8562968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/basicimage.hxx 2012-09-19 17:46:22.000000000 -0500 8662968b57SPedro Giffuni@@ -572,7 +572,11 @@ class BasicImage 8762968b57SPedro Giffuni typedef Alloc allocator_type; 8862968b57SPedro Giffuni 8962968b57SPedro Giffuni typedef Alloc Allocator; 9062968b57SPedro Giffuni+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 9162968b57SPedro Giffuni typedef typename Alloc::template rebind<PIXELTYPE *>::other LineAllocator; 9262968b57SPedro Giffuni+#else 9362968b57SPedro Giffuni+ typedef std::allocator<PIXELTYPE*> LineAllocator; 9462968b57SPedro Giffuni+#endif 9562968b57SPedro Giffuni 9662968b57SPedro Giffuni /** construct image of size 0x0 9762968b57SPedro Giffuni */ 9862968b57SPedro Giffuni@@ -589,39 +593,51 @@ class BasicImage 9962968b57SPedro Giffuni width_(0), 10062968b57SPedro Giffuni height_(0), 10162968b57SPedro Giffuni allocator_(alloc), 10262968b57SPedro Giffuni+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 10362968b57SPedro Giffuni pallocator_(alloc) 10462968b57SPedro Giffuni+#else 10562968b57SPedro Giffuni+ pallocator_() 10662968b57SPedro Giffuni+#endif 10762968b57SPedro Giffuni {} 10862968b57SPedro Giffuni 10962968b57SPedro Giffuni /** construct image of size width x height, use the specified allocator. 11062968b57SPedro Giffuni */ 11162968b57SPedro Giffuni- BasicImage(int width, int height, Alloc const & alloc = Alloc()) 11262968b57SPedro Giffuni+ BasicImage(int w, int h, Alloc const & alloc = Alloc()) 11362968b57SPedro Giffuni : data_(0), 11462968b57SPedro Giffuni width_(0), 11562968b57SPedro Giffuni height_(0), 11662968b57SPedro Giffuni allocator_(alloc), 11762968b57SPedro Giffuni+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 11862968b57SPedro Giffuni pallocator_(alloc) 11962968b57SPedro Giffuni+#else 12062968b57SPedro Giffuni+ pallocator_() 12162968b57SPedro Giffuni+#endif 12262968b57SPedro Giffuni { 12362968b57SPedro Giffuni- vigra_precondition((width >= 0) && (height >= 0), 12462968b57SPedro Giffuni- "BasicImage::BasicImage(int width, int height): " 12562968b57SPedro Giffuni+ vigra_precondition((w >= 0) && (h >= 0), 12662968b57SPedro Giffuni+ "BasicImage::BasicImage(int w, int h): " 12762968b57SPedro Giffuni "width and height must be >= 0.\n"); 12862968b57SPedro Giffuni 12962968b57SPedro Giffuni- resize(width, height, value_type()); 13062968b57SPedro Giffuni+ resize(w, h, value_type()); 13162968b57SPedro Giffuni } 13262968b57SPedro Giffuni 13362968b57SPedro Giffuni /** construct image of size size.x x size.y, use the specified allocator. 13462968b57SPedro Giffuni */ 13562968b57SPedro Giffuni- explicit BasicImage(difference_type const & size, Alloc const & alloc = Alloc()) 13662968b57SPedro Giffuni+ explicit BasicImage(difference_type const & sz, Alloc const & alloc = Alloc()) 13762968b57SPedro Giffuni : data_(0), 13862968b57SPedro Giffuni width_(0), 13962968b57SPedro Giffuni height_(0), 14062968b57SPedro Giffuni allocator_(alloc), 14162968b57SPedro Giffuni+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 14262968b57SPedro Giffuni pallocator_(alloc) 14362968b57SPedro Giffuni- { 14462968b57SPedro Giffuni- vigra_precondition((size.x >= 0) && (size.y >= 0), 14562968b57SPedro Giffuni- "BasicImage::BasicImage(Diff2D size): " 14662968b57SPedro Giffuni- "size.x and size.y must be >= 0.\n"); 14762968b57SPedro Giffuni+#else 14862968b57SPedro Giffuni+ pallocator_() 14962968b57SPedro Giffuni+#endif 15062968b57SPedro Giffuni+ { 15162968b57SPedro Giffuni+ vigra_precondition((sz.x >= 0) && (sz.y >= 0), 15262968b57SPedro Giffuni+ "BasicImage::BasicImage(Diff2D sz): " 15362968b57SPedro Giffuni+ "sz.x and sz.y must be >= 0.\n"); 15462968b57SPedro Giffuni 15562968b57SPedro Giffuni- resize(size.x, size.y, value_type()); 15662968b57SPedro Giffuni+ resize(sz.x, sz.y, value_type()); 15762968b57SPedro Giffuni } 15862968b57SPedro Giffuni 15962968b57SPedro Giffuni /** construct image of size width*height and initialize every 16062968b57SPedro Giffuni@@ -629,71 +645,87 @@ class BasicImage 16162968b57SPedro Giffuni value_type doesn't have a default constructor). 16262968b57SPedro Giffuni Use the specified allocator. 16362968b57SPedro Giffuni */ 16462968b57SPedro Giffuni- BasicImage(int width, int height, value_type const & d, Alloc const & alloc = Alloc()) 16562968b57SPedro Giffuni+ BasicImage(int w, int h, value_type const & d, Alloc const & alloc = Alloc()) 16662968b57SPedro Giffuni : data_(0), 16762968b57SPedro Giffuni width_(0), 16862968b57SPedro Giffuni height_(0), 16962968b57SPedro Giffuni allocator_(alloc), 17062968b57SPedro Giffuni+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 17162968b57SPedro Giffuni pallocator_(alloc) 17262968b57SPedro Giffuni+#else 17362968b57SPedro Giffuni+ pallocator_() 17462968b57SPedro Giffuni+#endif 17562968b57SPedro Giffuni { 17662968b57SPedro Giffuni- vigra_precondition((width >= 0) && (height >= 0), 17762968b57SPedro Giffuni- "BasicImage::BasicImage(int width, int height, value_type const & ): " 17862968b57SPedro Giffuni+ vigra_precondition((w >= 0) && (h >= 0), 17962968b57SPedro Giffuni+ "BasicImage::BasicImage(int w, int h, value_type const & ): " 18062968b57SPedro Giffuni "width and height must be >= 0.\n"); 18162968b57SPedro Giffuni 18262968b57SPedro Giffuni- resize(width, height, d); 18362968b57SPedro Giffuni+ resize(w, h, d); 18462968b57SPedro Giffuni } 18562968b57SPedro Giffuni 18662968b57SPedro Giffuni /** construct image of size size.x x size.y and initialize 18762968b57SPedro Giffuni every pixel with given data (use this constructor, if 18862968b57SPedro Giffuni value_type doesn't have a default constructor). Use the specified allocator. 18962968b57SPedro Giffuni */ 19062968b57SPedro Giffuni- explicit BasicImage(difference_type const & size, value_type const & d, Alloc const & alloc = Alloc()) 19162968b57SPedro Giffuni+ explicit BasicImage(difference_type const & sz, value_type const & d, Alloc const & alloc = Alloc()) 19262968b57SPedro Giffuni : data_(0), 19362968b57SPedro Giffuni width_(0), 19462968b57SPedro Giffuni height_(0), 19562968b57SPedro Giffuni allocator_(alloc), 19662968b57SPedro Giffuni+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 19762968b57SPedro Giffuni pallocator_(alloc) 19862968b57SPedro Giffuni- { 19962968b57SPedro Giffuni- vigra_precondition((size.x >= 0) && (size.y >= 0), 20062968b57SPedro Giffuni- "BasicImage::BasicImage(Diff2D const & size, value_type const & v): " 20162968b57SPedro Giffuni- "size.x and size.y must be >= 0.\n"); 20262968b57SPedro Giffuni+#else 20362968b57SPedro Giffuni+ pallocator_() 20462968b57SPedro Giffuni+#endif 20562968b57SPedro Giffuni+ { 20662968b57SPedro Giffuni+ vigra_precondition((sz.x >= 0) && (sz.y >= 0), 20762968b57SPedro Giffuni+ "BasicImage::BasicImage(Diff2D const & sz, value_type const & v): " 20862968b57SPedro Giffuni+ "sz.x and sz.y must be >= 0.\n"); 20962968b57SPedro Giffuni 21062968b57SPedro Giffuni- resize(size.x, size.y, d); 21162968b57SPedro Giffuni+ resize(sz.x, sz.y, d); 21262968b57SPedro Giffuni } 21362968b57SPedro Giffuni 21462968b57SPedro Giffuni 21562968b57SPedro Giffuni /** construct image of size width*height and copy the data from the 21662968b57SPedro Giffuni given C-style array \a d. Use the specified allocator. 21762968b57SPedro Giffuni */ 21862968b57SPedro Giffuni- BasicImage(int width, int height, const_pointer d, Alloc const & alloc = Alloc()) 21962968b57SPedro Giffuni+ BasicImage(int w, int h, const_pointer d, Alloc const & alloc = Alloc()) 22062968b57SPedro Giffuni : data_(0), 22162968b57SPedro Giffuni width_(0), 22262968b57SPedro Giffuni height_(0), 22362968b57SPedro Giffuni allocator_(alloc), 22462968b57SPedro Giffuni+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 22562968b57SPedro Giffuni pallocator_(alloc) 22662968b57SPedro Giffuni+#else 22762968b57SPedro Giffuni+ pallocator_() 22862968b57SPedro Giffuni+#endif 22962968b57SPedro Giffuni { 23062968b57SPedro Giffuni- vigra_precondition((width >= 0) && (height >= 0), 23162968b57SPedro Giffuni- "BasicImage::BasicImage(int width, int height, const_pointer ): " 23262968b57SPedro Giffuni+ vigra_precondition((w >= 0) && (h >= 0), 23362968b57SPedro Giffuni+ "BasicImage::BasicImage(int w, int h, const_pointer ): " 23462968b57SPedro Giffuni "width and height must be >= 0.\n"); 23562968b57SPedro Giffuni 23662968b57SPedro Giffuni- resizeCopy(width, height, d); 23762968b57SPedro Giffuni+ resizeCopy(w, h, d); 23862968b57SPedro Giffuni } 23962968b57SPedro Giffuni 24062968b57SPedro Giffuni /** construct image of size size.x x size.y and copy the data from the 24162968b57SPedro Giffuni given C-style array. Use the specified allocator. 24262968b57SPedro Giffuni */ 24362968b57SPedro Giffuni- explicit BasicImage(difference_type const & size, const_pointer d, Alloc const & alloc = Alloc()) 24462968b57SPedro Giffuni+ explicit BasicImage(difference_type const & sz, const_pointer d, Alloc const & alloc = Alloc()) 24562968b57SPedro Giffuni : data_(0), 24662968b57SPedro Giffuni width_(0), 24762968b57SPedro Giffuni height_(0), 24862968b57SPedro Giffuni allocator_(alloc), 24962968b57SPedro Giffuni+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 25062968b57SPedro Giffuni pallocator_(alloc) 25162968b57SPedro Giffuni- { 25262968b57SPedro Giffuni- vigra_precondition((size.x >= 0) && (size.y >= 0), 25362968b57SPedro Giffuni- "BasicImage::BasicImage(Diff2D const & size, const_pointer): " 25462968b57SPedro Giffuni- "size.x and size.y must be >= 0.\n"); 25562968b57SPedro Giffuni+#else 25662968b57SPedro Giffuni+ pallocator_() 25762968b57SPedro Giffuni+#endif 25862968b57SPedro Giffuni+ { 25962968b57SPedro Giffuni+ vigra_precondition((sz.x >= 0) && (sz.y >= 0), 26062968b57SPedro Giffuni+ "BasicImage::BasicImage(Diff2D const & sz, const_pointer): " 26162968b57SPedro Giffuni+ "sz.x and sz.y must be >= 0.\n"); 26262968b57SPedro Giffuni 26362968b57SPedro Giffuni- resizeCopy(size.x, size.y, d); 26462968b57SPedro Giffuni+ resizeCopy(sz.x, sz.y, d); 26562968b57SPedro Giffuni } 26662968b57SPedro Giffuni 26762968b57SPedro Giffuni /** copy rhs image 26862968b57SPedro Giffuni@@ -730,20 +762,20 @@ class BasicImage 26962968b57SPedro Giffuni /** reset image to specified size (dimensions must not be negative) 27062968b57SPedro Giffuni (old data are kept if new size matches old size) 27162968b57SPedro Giffuni */ 27262968b57SPedro Giffuni- void resize(int width, int height) 27362968b57SPedro Giffuni+ void resize(int w, int h) 27462968b57SPedro Giffuni { 27562968b57SPedro Giffuni- if(width != width_ || height != height_) 27662968b57SPedro Giffuni- resize(width, height, value_type()); 27762968b57SPedro Giffuni+ if(w != width_ || h != height_) 27862968b57SPedro Giffuni+ resize(w, h, value_type()); 27962968b57SPedro Giffuni } 28062968b57SPedro Giffuni 28162968b57SPedro Giffuni /** reset image to specified size (dimensions must not be negative) 28262968b57SPedro Giffuni (old data are kept if new size matches old size) 28362968b57SPedro Giffuni */ 28462968b57SPedro Giffuni- void resize(difference_type const & size) 28562968b57SPedro Giffuni+ void resize(difference_type const & sz) 28662968b57SPedro Giffuni { 28762968b57SPedro Giffuni- if(size.x != width_ || size.y != height_) 28862968b57SPedro Giffuni+ if(sz.x != width_ || sz.y != height_) 28962968b57SPedro Giffuni { 29062968b57SPedro Giffuni- resize(size.x, size.y, value_type()); 29162968b57SPedro Giffuni+ resize(sz.x, sz.y, value_type()); 29262968b57SPedro Giffuni } 29362968b57SPedro Giffuni } 29462968b57SPedro Giffuni 29562968b57SPedro Giffuni@@ -752,12 +784,12 @@ class BasicImage 29662968b57SPedro Giffuni constructor, dimensions must not be negative, 29762968b57SPedro Giffuni old data are kept if new size matches old size) 29862968b57SPedro Giffuni */ 29962968b57SPedro Giffuni- void resize(int width, int height, value_type const & d); 30062968b57SPedro Giffuni+ void resize(int w, int h, value_type const & d); 30162968b57SPedro Giffuni 30262968b57SPedro Giffuni /** resize image to given size and initialize by copying data 30362968b57SPedro Giffuni from the C-style arra \a data. 30462968b57SPedro Giffuni */ 30562968b57SPedro Giffuni- void resizeCopy(int width, int height, const_pointer data); 30662968b57SPedro Giffuni+ void resizeCopy(int w, int h, const_pointer data); 30762968b57SPedro Giffuni 30862968b57SPedro Giffuni /** resize image to size of other image and copy it's data 30962968b57SPedro Giffuni */ 31062968b57SPedro Giffuni@@ -1066,30 +1098,30 @@ BasicImage<PIXELTYPE, Alloc>::init(value 31162968b57SPedro Giffuni 31262968b57SPedro Giffuni template <class PIXELTYPE, class Alloc> 31362968b57SPedro Giffuni void 31462968b57SPedro Giffuni-BasicImage<PIXELTYPE, Alloc>::resize(int width, int height, value_type const & d) 31562968b57SPedro Giffuni+BasicImage<PIXELTYPE, Alloc>::resize(int w, int h, value_type const & d) 31662968b57SPedro Giffuni { 31762968b57SPedro Giffuni- vigra_precondition((width >= 0) && (height >= 0), 31862968b57SPedro Giffuni- "BasicImage::resize(int width, int height, value_type const &): " 31962968b57SPedro Giffuni+ vigra_precondition((w >= 0) && (h >= 0), 32062968b57SPedro Giffuni+ "BasicImage::resize(int w, int h, value_type const &): " 32162968b57SPedro Giffuni "width and height must be >= 0.\n"); 32262968b57SPedro Giffuni 32362968b57SPedro Giffuni- if (width_ != width || height_ != height) // change size? 32462968b57SPedro Giffuni+ if (width_ != w || height_ != h) // change size? 32562968b57SPedro Giffuni { 32662968b57SPedro Giffuni value_type * newdata = 0; 32762968b57SPedro Giffuni value_type ** newlines = 0; 32862968b57SPedro Giffuni- if(width*height > 0) 32962968b57SPedro Giffuni+ if(w*h > 0) 33062968b57SPedro Giffuni { 33162968b57SPedro Giffuni- if (width*height != width_*height_) // different sizes, must reallocate 33262968b57SPedro Giffuni+ if (w*h != width_*height_) // different sizes, must reallocate 33362968b57SPedro Giffuni { 33462968b57SPedro Giffuni- newdata = allocator_.allocate(typename Alloc::size_type(width*height)); 33562968b57SPedro Giffuni- std::uninitialized_fill_n(newdata, width*height, d); 33662968b57SPedro Giffuni- newlines = initLineStartArray(newdata, width, height); 33762968b57SPedro Giffuni+ newdata = allocator_.allocate(typename Alloc::size_type(w*h)); 33862968b57SPedro Giffuni+ std::uninitialized_fill_n(newdata, w*h, d); 33962968b57SPedro Giffuni+ newlines = initLineStartArray(newdata, w, h); 34062968b57SPedro Giffuni deallocate(); 34162968b57SPedro Giffuni } 34262968b57SPedro Giffuni else // need only to reshape 34362968b57SPedro Giffuni { 34462968b57SPedro Giffuni newdata = data_; 34562968b57SPedro Giffuni- std::fill_n(newdata, width*height, d); 34662968b57SPedro Giffuni- newlines = initLineStartArray(newdata, width, height); 34762968b57SPedro Giffuni+ std::fill_n(newdata, w*h, d); 34862968b57SPedro Giffuni+ newlines = initLineStartArray(newdata, w, h); 34962968b57SPedro Giffuni pallocator_.deallocate(lines_, typename Alloc::size_type(height_)); 35062968b57SPedro Giffuni } 35162968b57SPedro Giffuni } 35262968b57SPedro Giffuni@@ -1100,22 +1132,22 @@ BasicImage<PIXELTYPE, Alloc>::resize(int 35362968b57SPedro Giffuni 35462968b57SPedro Giffuni data_ = newdata; 35562968b57SPedro Giffuni lines_ = newlines; 35662968b57SPedro Giffuni- width_ = width; 35762968b57SPedro Giffuni- height_ = height; 35862968b57SPedro Giffuni+ width_ = w; 35962968b57SPedro Giffuni+ height_ = h; 36062968b57SPedro Giffuni } 36162968b57SPedro Giffuni- else if(width*height > 0) // keep size, re-init data 36262968b57SPedro Giffuni+ else if(w*h > 0) // keep size, re-init data 36362968b57SPedro Giffuni { 36462968b57SPedro Giffuni- std::fill_n(data_, width*height, d); 36562968b57SPedro Giffuni+ std::fill_n(data_, w*h, d); 36662968b57SPedro Giffuni } 36762968b57SPedro Giffuni } 36862968b57SPedro Giffuni 36962968b57SPedro Giffuni 37062968b57SPedro Giffuni template <class PIXELTYPE, class Alloc> 37162968b57SPedro Giffuni void 37262968b57SPedro Giffuni-BasicImage<PIXELTYPE, Alloc>::resizeCopy(int width, int height, const_pointer data) 37362968b57SPedro Giffuni+BasicImage<PIXELTYPE, Alloc>::resizeCopy(int w, int h, const_pointer src_data) 37462968b57SPedro Giffuni { 37562968b57SPedro Giffuni- int newsize = width*height; 37662968b57SPedro Giffuni- if (width_ != width || height_ != height) // change size? 37762968b57SPedro Giffuni+ int newsize = w*h; 37862968b57SPedro Giffuni+ if (width_ != w || height_ != h) // change size? 37962968b57SPedro Giffuni { 38062968b57SPedro Giffuni value_type * newdata = 0; 38162968b57SPedro Giffuni value_type ** newlines = 0; 382*a09c9fefSHerbert Dürr@@ -1124,15 +1156,15 @@ BasicImage<PIXELTYPE, Alloc>::resizeCopy 38362968b57SPedro Giffuni if (newsize != width_*height_) // different sizes, must reallocate 38462968b57SPedro Giffuni { 38562968b57SPedro Giffuni newdata = allocator_.allocate(typename Alloc::size_type(newsize)); 38662968b57SPedro Giffuni- std::uninitialized_copy(data, data + newsize, newdata); 38762968b57SPedro Giffuni- newlines = initLineStartArray(newdata, width, height); 38862968b57SPedro Giffuni+ std::uninitialized_copy(src_data, src_data + newsize, newdata); 38962968b57SPedro Giffuni+ newlines = initLineStartArray(newdata, w, h); 39062968b57SPedro Giffuni deallocate(); 39162968b57SPedro Giffuni } 39262968b57SPedro Giffuni else // need only to reshape 393*a09c9fefSHerbert Dürr { 394*a09c9fefSHerbert Dürr newdata = data_; 395*a09c9fefSHerbert Dürr- std::copy(data, data + newsize, newdata); 396*a09c9fefSHerbert Dürr- newlines = initLineStartArray(newdata, width, height); 397*a09c9fefSHerbert Dürr+ std::copy(src_data, src_data + newsize, newdata); 398*a09c9fefSHerbert Dürr+ newlines = initLineStartArray(newdata, w, h); 399*a09c9fefSHerbert Dürr pallocator_.deallocate(lines_, typename Alloc::size_type(height_)); 400*a09c9fefSHerbert Dürr } 401*a09c9fefSHerbert Dürr } 40262968b57SPedro Giffuni@@ -1143,12 +1175,12 @@ BasicImage<PIXELTYPE, Alloc>::resizeCopy 40362968b57SPedro Giffuni 40462968b57SPedro Giffuni data_ = newdata; 40562968b57SPedro Giffuni lines_ = newlines; 40662968b57SPedro Giffuni- width_ = width; 40762968b57SPedro Giffuni- height_ = height; 40862968b57SPedro Giffuni+ width_ = w; 40962968b57SPedro Giffuni+ height_ = h; 41062968b57SPedro Giffuni } 41162968b57SPedro Giffuni else if(newsize > 0) // keep size, copy data 41262968b57SPedro Giffuni { 41362968b57SPedro Giffuni- std::copy(data, data + newsize, data_); 41462968b57SPedro Giffuni+ std::copy(src_data, src_data + newsize, data_); 41562968b57SPedro Giffuni } 41662968b57SPedro Giffuni } 41762968b57SPedro Giffuni 41862968b57SPedro Giffuni@@ -1183,11 +1215,11 @@ BasicImage<PIXELTYPE, Alloc>::deallocate 41962968b57SPedro Giffuni 42062968b57SPedro Giffuni template <class PIXELTYPE, class Alloc> 42162968b57SPedro Giffuni PIXELTYPE ** 42262968b57SPedro Giffuni-BasicImage<PIXELTYPE, Alloc>::initLineStartArray(value_type * data, int width, int height) 42362968b57SPedro Giffuni+BasicImage<PIXELTYPE, Alloc>::initLineStartArray(value_type * src_data, int w, int h) 42462968b57SPedro Giffuni { 42562968b57SPedro Giffuni- value_type ** lines = pallocator_.allocate(typename Alloc::size_type(height)); 42662968b57SPedro Giffuni- for(int y=0; y<height; ++y) 42762968b57SPedro Giffuni- lines[y] = data + y*width; 42862968b57SPedro Giffuni+ value_type ** lines = pallocator_.allocate(typename Alloc::size_type(h)); 42962968b57SPedro Giffuni+ for(int y=0; y<h; ++y) 43062968b57SPedro Giffuni+ lines[y] = src_data + y*w; 43162968b57SPedro Giffuni return lines; 43262968b57SPedro Giffuni } 43362968b57SPedro Giffuni 43462968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/basicimageview.hxx misc/build/vigra1.6.0/include/vigra/basicimageview.hxx 43562968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/basicimageview.hxx 2008-08-13 08:15:34.000000000 -0500 43662968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/basicimageview.hxx 2012-09-19 17:30:24.000000000 -0500 43762968b57SPedro Giffuni@@ -176,20 +176,20 @@ class BasicImageView 43862968b57SPedro Giffuni 43962968b57SPedro Giffuni /** construct view of size w x h 44062968b57SPedro Giffuni */ 44162968b57SPedro Giffuni- BasicImageView(const_pointer data, int w, int h, int stride = 0) 44262968b57SPedro Giffuni- : data_(const_cast<pointer>(data)), 44362968b57SPedro Giffuni+ BasicImageView(const_pointer src_data, int w, int h, int data_stride = 0) 44462968b57SPedro Giffuni+ : data_(const_cast<pointer>(src_data)), 44562968b57SPedro Giffuni width_(w), 44662968b57SPedro Giffuni height_(h), 44762968b57SPedro Giffuni- stride_(stride == 0 ? w : stride) 44862968b57SPedro Giffuni+ stride_(data_stride == 0 ? w : data_stride) 44962968b57SPedro Giffuni {} 45062968b57SPedro Giffuni 45162968b57SPedro Giffuni /** construct view of size size.x x size.y 45262968b57SPedro Giffuni */ 45362968b57SPedro Giffuni- BasicImageView(const_pointer data, difference_type const & size, int stride = 0) 45462968b57SPedro Giffuni- : data_(const_cast<pointer>(data)), 45562968b57SPedro Giffuni- width_(size.x), 45662968b57SPedro Giffuni- height_(size.y), 45762968b57SPedro Giffuni- stride_(stride == 0 ? size.x : stride) 45862968b57SPedro Giffuni+ BasicImageView(const_pointer src_data, difference_type const & sz, int data_stride = 0) 45962968b57SPedro Giffuni+ : data_(const_cast<pointer>(src_data)), 46062968b57SPedro Giffuni+ width_(sz.x), 46162968b57SPedro Giffuni+ height_(sz.y), 46262968b57SPedro Giffuni+ stride_(data_stride == 0 ? sz.x : data_stride) 46362968b57SPedro Giffuni {} 46462968b57SPedro Giffuni 46562968b57SPedro Giffuni /** set Image with const value 46662968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/boundarytensor.hxx misc/build/vigra1.6.0/include/vigra/boundarytensor.hxx 46762968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/boundarytensor.hxx 2008-08-13 08:15:34.000000000 -0500 46862968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/boundarytensor.hxx 2012-09-19 17:30:24.000000000 -0500 46962968b57SPedro Giffuni@@ -71,8 +71,8 @@ initGaussianPolarFilters1(double std_dev 47062968b57SPedro Giffuni int radius = (int)(4.0*std_dev + 0.5); 47162968b57SPedro Giffuni std_dev *= 1.08179074376; 47262968b57SPedro Giffuni double f = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / std_dev; // norm 47362968b57SPedro Giffuni- double a = 0.558868151788 / VIGRA_CSTD::pow(std_dev, 5); 47462968b57SPedro Giffuni- double b = -2.04251639729 / VIGRA_CSTD::pow(std_dev, 3); 47562968b57SPedro Giffuni+ double a = 0.558868151788 / VIGRA_CSTD::pow(std_dev, 5.0); 47662968b57SPedro Giffuni+ double b = -2.04251639729 / VIGRA_CSTD::pow(std_dev, 3.0); 47762968b57SPedro Giffuni double sigma22 = -0.5 / std_dev / std_dev; 47862968b57SPedro Giffuni 47962968b57SPedro Giffuni 48062968b57SPedro Giffuni@@ -175,7 +175,7 @@ initGaussianPolarFilters3(double std_dev 48162968b57SPedro Giffuni std_dev *= 1.15470053838; 48262968b57SPedro Giffuni double sigma22 = -0.5 / std_dev / std_dev; 48362968b57SPedro Giffuni double f = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / std_dev; // norm 48462968b57SPedro Giffuni- double a = 0.883887052922 / VIGRA_CSTD::pow(std_dev, 5); 48562968b57SPedro Giffuni+ double a = 0.883887052922 / VIGRA_CSTD::pow(std_dev, 5.0); 48662968b57SPedro Giffuni 48762968b57SPedro Giffuni for(unsigned int i=0; i<k.size(); ++i) 48862968b57SPedro Giffuni { 48962968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/config.hxx misc/build/vigra1.6.0/include/vigra/config.hxx 49062968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/config.hxx 2008-08-13 08:15:35.000000000 -0500 49162968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/config.hxx 2012-09-19 17:30:24.000000000 -0500 49262968b57SPedro Giffuni@@ -84,6 +84,12 @@ 49362968b57SPedro Giffuni #endif // VIGRA_NO_STD_MINMAX 49462968b57SPedro Giffuni #endif // (_MSC_VER < 1300) 49562968b57SPedro Giffuni 49662968b57SPedro Giffuni+ #if _MSC_VER <= 1310 49762968b57SPedro Giffuni+ #ifndef CMATH_NOT_IN_STD 49862968b57SPedro Giffuni+ #define CMATH_NOT_IN_STD 49962968b57SPedro Giffuni+ #endif 50062968b57SPedro Giffuni+ #endif // _MSC_VER < 1310 50162968b57SPedro Giffuni+ 50262968b57SPedro Giffuni #if _MSC_VER < 1310 50362968b57SPedro Giffuni #define NO_PARTIAL_TEMPLATE_SPECIALIZATION 50462968b57SPedro Giffuni #define NO_OUT_OF_LINE_MEMBER_TEMPLATES 50562968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/diff2d.hxx misc/build/vigra1.6.0/include/vigra/diff2d.hxx 50662968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/diff2d.hxx 2008-08-13 08:15:35.000000000 -0500 50762968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/diff2d.hxx 2012-09-19 17:30:24.000000000 -0500 50862968b57SPedro Giffuni@@ -490,8 +490,8 @@ public: 50962968b57SPedro Giffuni 51062968b57SPedro Giffuni /** Construct point at given position. 51162968b57SPedro Giffuni */ 51262968b57SPedro Giffuni- Size2D(int width, int height) 51362968b57SPedro Giffuni- : Diff2D(width, height) 51462968b57SPedro Giffuni+ Size2D(int w, int h) 51562968b57SPedro Giffuni+ : Diff2D(w, h) 51662968b57SPedro Giffuni {} 51762968b57SPedro Giffuni 51862968b57SPedro Giffuni /** Copy Constructor. 51962968b57SPedro Giffuni@@ -620,8 +620,8 @@ public: 52062968b57SPedro Giffuni 52162968b57SPedro Giffuni /** Construct point at given position. 52262968b57SPedro Giffuni */ 52362968b57SPedro Giffuni- Point2D(int x, int y) 52462968b57SPedro Giffuni- : Diff2D(x, y) 52562968b57SPedro Giffuni+ Point2D(int x_, int y_) 52662968b57SPedro Giffuni+ : Diff2D(x_, y_) 52762968b57SPedro Giffuni {} 52862968b57SPedro Giffuni 52962968b57SPedro Giffuni /** Copy Constructor. 53062968b57SPedro Giffuni@@ -884,26 +884,26 @@ public: 53162968b57SPedro Giffuni * (lowerRight is considered to be outside the rectangle as 53262968b57SPedro Giffuni * usual in the VIGRA) 53362968b57SPedro Giffuni */ 53462968b57SPedro Giffuni- Rect2D(Point2D const &upperLeft, Point2D const &lowerRight) 53562968b57SPedro Giffuni- : upperLeft_(upperLeft), lowerRight_(lowerRight) 53662968b57SPedro Giffuni+ Rect2D(Point2D const &ul, Point2D const &lr) 53762968b57SPedro Giffuni+ : upperLeft_(ul), lowerRight_(lr) 53862968b57SPedro Giffuni {} 53962968b57SPedro Giffuni 54062968b57SPedro Giffuni /** Construct a rectangle representing the given range 54162968b57SPedro Giffuni */ 54262968b57SPedro Giffuni- Rect2D(int left, int top, int right, int bottom) 54362968b57SPedro Giffuni- : upperLeft_(left, top), lowerRight_(right, bottom) 54462968b57SPedro Giffuni+ Rect2D(int l, int t, int r, int b) 54562968b57SPedro Giffuni+ : upperLeft_(l,t), lowerRight_(r,b) 54662968b57SPedro Giffuni {} 54762968b57SPedro Giffuni 54862968b57SPedro Giffuni /** Construct a rectangle of given position and size 54962968b57SPedro Giffuni */ 55062968b57SPedro Giffuni- Rect2D(Point2D const &upperLeft, Size2D const &size) 55162968b57SPedro Giffuni- : upperLeft_(upperLeft), lowerRight_(upperLeft + size) 55262968b57SPedro Giffuni+ Rect2D(Point2D const &ul, Size2D const &sz) 55362968b57SPedro Giffuni+ : upperLeft_(ul), lowerRight_(ul + sz) 55462968b57SPedro Giffuni {} 55562968b57SPedro Giffuni 55662968b57SPedro Giffuni /** Construct a rectangle of given size at position (0,0) 55762968b57SPedro Giffuni */ 55862968b57SPedro Giffuni- explicit Rect2D(Size2D const &size) 55962968b57SPedro Giffuni- : lowerRight_(Point2D(size)) 56062968b57SPedro Giffuni+ explicit Rect2D(Size2D const &sz) 56162968b57SPedro Giffuni+ : lowerRight_(Point2D(sz)) 56262968b57SPedro Giffuni {} 56362968b57SPedro Giffuni 56462968b57SPedro Giffuni /** Return the first point (scan-order wise) which is 56562968b57SPedro Giffuni@@ -950,9 +950,9 @@ public: 56662968b57SPedro Giffuni /** Move the whole rectangle so that upperLeft() will become 56762968b57SPedro Giffuni * Point2D(left, top) afterwards. 56862968b57SPedro Giffuni */ 56962968b57SPedro Giffuni- void moveTo(int left, int top) 57062968b57SPedro Giffuni+ void moveTo(int l, int t) 57162968b57SPedro Giffuni { 57262968b57SPedro Giffuni- moveTo(Point2D(left, top)); 57362968b57SPedro Giffuni+ moveTo(Point2D(l, t)); 57462968b57SPedro Giffuni } 57562968b57SPedro Giffuni 57662968b57SPedro Giffuni /** Move the whole rectangle by the given 2D offset. 57762968b57SPedro Giffuni@@ -1037,17 +1037,17 @@ public: 57862968b57SPedro Giffuni /** Resize this rectangle to the given extents. This will move 57962968b57SPedro Giffuni * the lower right corner only. 58062968b57SPedro Giffuni */ 58162968b57SPedro Giffuni- void setSize(Size2D const &size) 58262968b57SPedro Giffuni+ void setSize(Size2D const &sz) 58362968b57SPedro Giffuni { 58462968b57SPedro Giffuni- lowerRight_ = upperLeft_ + size; 58562968b57SPedro Giffuni+ lowerRight_ = upperLeft_ + sz; 58662968b57SPedro Giffuni } 58762968b57SPedro Giffuni 58862968b57SPedro Giffuni /** Resize this rectangle to the given extents. This will move 58962968b57SPedro Giffuni * the lower right corner only. 59062968b57SPedro Giffuni */ 59162968b57SPedro Giffuni- void setSize(int width, int height) 59262968b57SPedro Giffuni+ void setSize(int w, int h) 59362968b57SPedro Giffuni { 59462968b57SPedro Giffuni- lowerRight_ = upperLeft_ + Size2D(width, height); 59562968b57SPedro Giffuni+ lowerRight_ = upperLeft_ + Size2D(w, h); 59662968b57SPedro Giffuni } 59762968b57SPedro Giffuni 59862968b57SPedro Giffuni /** Increase the size of the rectangle by the given offset. This 59962968b57SPedro Giffuni@@ -1131,7 +1131,7 @@ public: 60062968b57SPedro Giffuni bool contains(Rect2D const &r) const 60162968b57SPedro Giffuni { 60262968b57SPedro Giffuni return r.isEmpty() || 60362968b57SPedro Giffuni- contains(r.upperLeft()) && contains(r.lowerRight()-Diff2D(1,1)); 60462968b57SPedro Giffuni+ (contains(r.upperLeft()) && contains(r.lowerRight()-Diff2D(1,1))); 60562968b57SPedro Giffuni } 60662968b57SPedro Giffuni 60762968b57SPedro Giffuni /** Return whether this rectangle overlaps with the given 60862968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/fftw.hxx misc/build/vigra1.6.0/include/vigra/fftw.hxx 60962968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/fftw.hxx 2008-08-13 08:15:36.000000000 -0500 61062968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/fftw.hxx 2012-09-19 17:30:24.000000000 -0500 61162968b57SPedro Giffuni@@ -399,8 +399,6 @@ inline FFTWComplex operator /(FFTWComple 61262968b57SPedro Giffuni return a; 61362968b57SPedro Giffuni } 61462968b57SPedro Giffuni 61562968b57SPedro Giffuni-using VIGRA_CSTD::abs; 61662968b57SPedro Giffuni- 61762968b57SPedro Giffuni inline FFTWComplex::value_type abs(const FFTWComplex &a) 61862968b57SPedro Giffuni { 61962968b57SPedro Giffuni return a.magnitude(); 62062968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/fftw3.hxx misc/build/vigra1.6.0/include/vigra/fftw3.hxx 62162968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/fftw3.hxx 2008-08-13 08:15:36.000000000 -0500 62262968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/fftw3.hxx 2012-09-19 17:30:24.000000000 -0500 62362968b57SPedro Giffuni@@ -572,8 +572,6 @@ inline FFTWComplex operator /(FFTWComple 62462968b57SPedro Giffuni return a; 62562968b57SPedro Giffuni } 62662968b57SPedro Giffuni 62762968b57SPedro Giffuni-using VIGRA_CSTD::abs; 62862968b57SPedro Giffuni- 62962968b57SPedro Giffuni /// absolute value (= magnitude) 63062968b57SPedro Giffuni inline FFTWComplex::value_type abs(const FFTWComplex &a) 63162968b57SPedro Giffuni { 63262968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/fixedpoint.hxx misc/build/vigra1.6.0/include/vigra/fixedpoint.hxx 63362968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/fixedpoint.hxx 2008-08-13 08:15:36.000000000 -0500 63462968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/fixedpoint.hxx 2012-09-19 17:30:24.000000000 -0500 63562968b57SPedro Giffuni@@ -118,20 +118,18 @@ enum FixedPointNoShift { FPNoShift }; 63662968b57SPedro Giffuni 63762968b57SPedro Giffuni namespace detail { 63862968b57SPedro Giffuni 63962968b57SPedro Giffuni-template <bool MustRound> 64062968b57SPedro Giffuni+template <bool MustRound, int N> 64162968b57SPedro Giffuni struct FPAssignWithRound; 64262968b57SPedro Giffuni 64362968b57SPedro Giffuni-template <> 64462968b57SPedro Giffuni-struct FPAssignWithRound<false> 64562968b57SPedro Giffuni+template <int N> 64662968b57SPedro Giffuni+struct FPAssignWithRound<false, N> 64762968b57SPedro Giffuni { 64862968b57SPedro Giffuni- template <int N> 64962968b57SPedro Giffuni static inline int exec(int v) { return v << (-N); } 65062968b57SPedro Giffuni }; 65162968b57SPedro Giffuni 65262968b57SPedro Giffuni-template <> 65362968b57SPedro Giffuni-struct FPAssignWithRound<true> 65462968b57SPedro Giffuni+template <int N> 65562968b57SPedro Giffuni+struct FPAssignWithRound<true, N> 65662968b57SPedro Giffuni { 65762968b57SPedro Giffuni- template <int N> 65862968b57SPedro Giffuni static inline int exec(int const v) 65962968b57SPedro Giffuni { 66062968b57SPedro Giffuni return (v + (1 << (N - 1))) >> (N); 66162968b57SPedro Giffuni@@ -276,7 +274,7 @@ public: 66262968b57SPedro Giffuni */ 66362968b57SPedro Giffuni template <unsigned Int2, unsigned Frac2> 66462968b57SPedro Giffuni FixedPoint(const FixedPoint<Int2, Frac2> &other) 66562968b57SPedro Giffuni- : value(detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value)) 66662968b57SPedro Giffuni+ : value(detail::FPAssignWithRound<(Frac2 > FractionalBits), Frac2 - FractionalBits>::exec(other.value)) 66762968b57SPedro Giffuni { 66862968b57SPedro Giffuni VIGRA_STATIC_ASSERT((FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>)); 66962968b57SPedro Giffuni VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>)); 67062968b57SPedro Giffuni@@ -321,7 +319,7 @@ public: 67162968b57SPedro Giffuni FixedPoint & operator=(const FixedPoint<Int2, Frac2> &other) 67262968b57SPedro Giffuni { 67362968b57SPedro Giffuni VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>)); 67462968b57SPedro Giffuni- value = detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value); 67562968b57SPedro Giffuni+ value = detail::FPAssignWithRound<(Frac2 > FractionalBits),Frac2 - FractionalBits>::exec(other.value); 67662968b57SPedro Giffuni return *this; 67762968b57SPedro Giffuni } 67862968b57SPedro Giffuni 67962968b57SPedro Giffuni@@ -373,7 +371,7 @@ public: 68062968b57SPedro Giffuni FixedPoint & operator+=(const FixedPoint<Int2, Frac2> &other) 68162968b57SPedro Giffuni { 68262968b57SPedro Giffuni VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>)); 68362968b57SPedro Giffuni- value += detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value); 68462968b57SPedro Giffuni+ value += detail::FPAssignWithRound<(Frac2 > FractionalBits),Frac2 - FractionalBits>::exec(other.value); 68562968b57SPedro Giffuni return *this; 68662968b57SPedro Giffuni } 68762968b57SPedro Giffuni 68862968b57SPedro Giffuni@@ -384,7 +382,7 @@ public: 68962968b57SPedro Giffuni FixedPoint & operator-=(const FixedPoint<Int2, Frac2> &other) 69062968b57SPedro Giffuni { 69162968b57SPedro Giffuni VIGRA_STATIC_ASSERT((FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>)); 69262968b57SPedro Giffuni- value -= detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec<Frac2 - FractionalBits>(other.value); 69362968b57SPedro Giffuni+ value -= detail::FPAssignWithRound<(Frac2 > FractionalBits),Frac2 - FractionalBits>::exec(other.value); 69462968b57SPedro Giffuni return *this; 69562968b57SPedro Giffuni } 69662968b57SPedro Giffuni 69762968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/gaborfilter.hxx misc/build/vigra1.6.0/include/vigra/gaborfilter.hxx 69862968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/gaborfilter.hxx 2008-08-13 08:15:36.000000000 -0500 69962968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/gaborfilter.hxx 2012-09-19 17:30:24.000000000 -0500 70062968b57SPedro Giffuni@@ -287,7 +287,11 @@ inline double angularGaborSigma(int dire 70162968b57SPedro Giffuni Namespace: vigra 70262968b57SPedro Giffuni */ 70362968b57SPedro Giffuni template <class ImageType, 70462968b57SPedro Giffuni+#ifndef VIGRA_WITHOUT_NESTED_TEMPLATE_PARAMS 70562968b57SPedro Giffuni class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other > 70662968b57SPedro Giffuni+#else 70762968b57SPedro Giffuni+ class Alloc = std::allocator<ImageType> > 70862968b57SPedro Giffuni+#endif 70962968b57SPedro Giffuni class GaborFilterFamily 71062968b57SPedro Giffuni : public ImageArray<ImageType, Alloc> 71162968b57SPedro Giffuni { 71262968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/gaussians.hxx misc/build/vigra1.6.0/include/vigra/gaussians.hxx 71362968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/gaussians.hxx 2008-08-13 08:15:36.000000000 -0500 71462968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/gaussians.hxx 2012-09-19 17:30:24.000000000 -0500 71562968b57SPedro Giffuni@@ -88,26 +88,26 @@ class Gaussian 71662968b57SPedro Giffuni sigma > 0.0 71762968b57SPedro Giffuni \endcode 71862968b57SPedro Giffuni */ 71962968b57SPedro Giffuni- explicit Gaussian(T sigma = 1.0, unsigned int derivativeOrder = 0) 72062968b57SPedro Giffuni- : sigma_(sigma), 72162968b57SPedro Giffuni- sigma2_(-0.5 / sigma / sigma), 72262968b57SPedro Giffuni+ explicit Gaussian(T s = 1.0, unsigned int derivOrder = 0) 72362968b57SPedro Giffuni+ : sigma_(s), 72462968b57SPedro Giffuni+ sigma2_(-0.5 / s / s), 72562968b57SPedro Giffuni norm_(0.0), 72662968b57SPedro Giffuni- order_(derivativeOrder), 72762968b57SPedro Giffuni- hermitePolynomial_(derivativeOrder / 2 + 1) 72862968b57SPedro Giffuni+ order_(derivOrder), 72962968b57SPedro Giffuni+ hermitePolynomial_(derivOrder / 2 + 1) 73062968b57SPedro Giffuni { 73162968b57SPedro Giffuni- vigra_precondition(sigma_ > 0.0, 73262968b57SPedro Giffuni+ vigra_precondition(s > 0.0, 73362968b57SPedro Giffuni "Gaussian::Gaussian(): sigma > 0 required."); 73462968b57SPedro Giffuni switch(order_) 73562968b57SPedro Giffuni { 73662968b57SPedro Giffuni case 1: 73762968b57SPedro Giffuni case 2: 73862968b57SPedro Giffuni- norm_ = -1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(sigma) * sigma); 73962968b57SPedro Giffuni+ norm_ = -1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(s) * s); 74062968b57SPedro Giffuni break; 74162968b57SPedro Giffuni case 3: 74262968b57SPedro Giffuni- norm_ = 1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(sigma) * sq(sigma) * sigma); 74362968b57SPedro Giffuni+ norm_ = 1.0 / (VIGRA_CSTD::sqrt(2.0 * M_PI) * sq(s) * sq(s) * s); 74462968b57SPedro Giffuni break; 74562968b57SPedro Giffuni default: 74662968b57SPedro Giffuni- norm_ = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / sigma; 74762968b57SPedro Giffuni+ norm_ = 1.0 / VIGRA_CSTD::sqrt(2.0 * M_PI) / s; 74862968b57SPedro Giffuni } 74962968b57SPedro Giffuni calculateHermitePolynomial(); 75062968b57SPedro Giffuni } 7517ddac0f0SPedro Giffuni--- misc/vigra1.6.0/include/vigra/mathutil.hxx 2008-08-13 08:15:38.000000000 -0500 7520ee13d32SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/mathutil.hxx 2012-09-21 02:16:23.000000000 -0500 7537ddac0f0SPedro Giffuni@@ -88,7 +88,7 @@ using VIGRA_CSTD::ceil; 7547ddac0f0SPedro Giffuni 7557ddac0f0SPedro Giffuni // import abs(float), abs(double), abs(long double) from <cmath> 7567ddac0f0SPedro Giffuni // and abs(int), abs(long), abs(long long) from <cstdlib> 7577ddac0f0SPedro Giffuni-using std::abs; 7587ddac0f0SPedro Giffuni+//using std::abs; 7597ddac0f0SPedro Giffuni 7607ddac0f0SPedro Giffuni // define the missing variants of abs() to avoid 'ambigous overload' 7617ddac0f0SPedro Giffuni // errors in template functions 7620ee13d32SPedro Giffuni@@ -100,17 +100,41 @@ VIGRA_DEFINE_UNSIGNED_ABS(unsigned char) 7637ddac0f0SPedro Giffuni VIGRA_DEFINE_UNSIGNED_ABS(unsigned short) 7647ddac0f0SPedro Giffuni VIGRA_DEFINE_UNSIGNED_ABS(unsigned int) 7657ddac0f0SPedro Giffuni VIGRA_DEFINE_UNSIGNED_ABS(unsigned long) 7667ddac0f0SPedro Giffuni+#ifdef VIGRA_HAS_LONG_LONG 7677ddac0f0SPedro Giffuni VIGRA_DEFINE_UNSIGNED_ABS(unsigned long long) 7687ddac0f0SPedro Giffuni+#endif 7697ddac0f0SPedro Giffuni 7707ddac0f0SPedro Giffuni #undef VIGRA_DEFINE_UNSIGNED_ABS 7717ddac0f0SPedro Giffuni 7720ee13d32SPedro Giffuni #define VIGRA_DEFINE_MISSING_ABS(T) \ 7730ee13d32SPedro Giffuni inline T abs(T t) { return t < 0 ? -t : t; } 7740ee13d32SPedro Giffuni 7750ee13d32SPedro Giffuni-VIGRA_DEFINE_MISSING_ABS(signed char) 7760ee13d32SPedro Giffuni-VIGRA_DEFINE_MISSING_ABS(signed short) 7777ddac0f0SPedro Giffuni+#define VIGRA_DEFINE_SIGNED_ABS(T) \ 7787ddac0f0SPedro Giffuni+ inline T abs(T t) { return (T)abs(t); } 7797ddac0f0SPedro Giffuni+#define VIGRA_DEFINE_SIGNED_LABS(T) \ 7807ddac0f0SPedro Giffuni+ inline T abs(T t) { return (T)labs(t); } 7817ddac0f0SPedro Giffuni+#define VIGRA_DEFINE_SIGNED_LLABS(T) \ 7827ddac0f0SPedro Giffuni+ inline T abs(T t) { return (T)llabs(t); } 7837ddac0f0SPedro Giffuni+#define VIGRA_DEFINE_FABS(T) \ 7847ddac0f0SPedro Giffuni+ inline T abs(T t) { return (T)fabs(t); } 7857ddac0f0SPedro Giffuni+ 7867ddac0f0SPedro Giffuni+VIGRA_DEFINE_SIGNED_ABS(signed char) 7877ddac0f0SPedro Giffuni+VIGRA_DEFINE_SIGNED_ABS(signed short) 7887ddac0f0SPedro Giffuni+VIGRA_DEFINE_SIGNED_ABS(signed int) 7897ddac0f0SPedro Giffuni+VIGRA_DEFINE_SIGNED_LABS(signed long) 7907ddac0f0SPedro Giffuni+#ifdef VIGRA_HAS_LONG_LONG 7917ddac0f0SPedro Giffuni+VIGRA_DEFINE_SIGNED_LLABS(signed long long) 7927ddac0f0SPedro Giffuni+#endif 7937ddac0f0SPedro Giffuni+VIGRA_DEFINE_FABS(float) 7947ddac0f0SPedro Giffuni+VIGRA_DEFINE_FABS(double) 7957ddac0f0SPedro Giffuni+#ifdef VIGRA_HAS_LONG_DOUBLE 7967ddac0f0SPedro Giffuni+VIGRA_DEFINE_FABS(long double) 7977ddac0f0SPedro Giffuni+#endif 7980ee13d32SPedro Giffuni 7990ee13d32SPedro Giffuni-#undef VIGRA_DEFINE_MISSING_ABS 8007ddac0f0SPedro Giffuni+#undef VIGRA_DEFINE_SIGNED_ABS 8017ddac0f0SPedro Giffuni+#undef VIGRA_DEFINE_SIGNED_LABS 8027ddac0f0SPedro Giffuni+#undef VIGRA_DEFINE_SIGNED_LLABS 8037ddac0f0SPedro Giffuni+#undef VIGRA_DEFINE_FABS 8047ddac0f0SPedro Giffuni 8050ee13d32SPedro Giffuni /*! The rounding function. 8060ee13d32SPedro Giffuni 8070ee13d32SPedro Giffuni@@ -134,12 +158,14 @@ inline double round(double t) 8087ddac0f0SPedro Giffuni : ceil(t - 0.5); 8097ddac0f0SPedro Giffuni } 8107ddac0f0SPedro Giffuni 8117ddac0f0SPedro Giffuni+#ifdef VIGRA_HAS_LONG_DOUBLE 8127ddac0f0SPedro Giffuni inline long double round(long double t) 8137ddac0f0SPedro Giffuni { 8147ddac0f0SPedro Giffuni return t >= 0.0 8157ddac0f0SPedro Giffuni ? floor(t + 0.5) 8167ddac0f0SPedro Giffuni : ceil(t - 0.5); 8177ddac0f0SPedro Giffuni } 8187ddac0f0SPedro Giffuni+#endif 8197ddac0f0SPedro Giffuni 8207ddac0f0SPedro Giffuni /*! Round up to the nearest power of 2. 8217ddac0f0SPedro Giffuni 8220ee13d32SPedro Giffuni@@ -440,9 +466,15 @@ VIGRA_DEFINE_NORM(int) 8237ddac0f0SPedro Giffuni VIGRA_DEFINE_NORM(unsigned int) 8247ddac0f0SPedro Giffuni VIGRA_DEFINE_NORM(long) 8257ddac0f0SPedro Giffuni VIGRA_DEFINE_NORM(unsigned long) 8267ddac0f0SPedro Giffuni+#ifdef VIGRA_HAS_LONG_LONG 8277ddac0f0SPedro Giffuni+VIGRA_DEFINE_NORM(long long) 8287ddac0f0SPedro Giffuni+VIGRA_DEFINE_NORM(unsigned long long) 8297ddac0f0SPedro Giffuni+#endif 8307ddac0f0SPedro Giffuni VIGRA_DEFINE_NORM(float) 8317ddac0f0SPedro Giffuni VIGRA_DEFINE_NORM(double) 8327ddac0f0SPedro Giffuni+#ifdef VIGRA_HAS_LONG_DOUBLE 8337ddac0f0SPedro Giffuni VIGRA_DEFINE_NORM(long double) 8347ddac0f0SPedro Giffuni+#endif 8357ddac0f0SPedro Giffuni 8367ddac0f0SPedro Giffuni #undef VIGRA_DEFINE_NORM 8377ddac0f0SPedro Giffuni 83862968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/numerictraits.hxx misc/build/vigra1.6.0/include/vigra/numerictraits.hxx 83962968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/numerictraits.hxx 2008-08-13 08:15:39.000000000 -0500 84062968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/numerictraits.hxx 2012-09-19 17:30:24.000000000 -0500 84162968b57SPedro Giffuni@@ -863,6 +863,90 @@ struct NumericTraits<long> 84262968b57SPedro Giffuni } 84362968b57SPedro Giffuni }; 84462968b57SPedro Giffuni 84562968b57SPedro Giffuni+#ifdef VIGRA_HAS_LONG_LONG 84662968b57SPedro Giffuni+template<> 84762968b57SPedro Giffuni+struct NumericTraits<long long> 84862968b57SPedro Giffuni+{ 84962968b57SPedro Giffuni+ typedef long long Type; 85062968b57SPedro Giffuni+ typedef long long Promote; 85162968b57SPedro Giffuni+ typedef double RealPromote; 85262968b57SPedro Giffuni+ typedef std::complex<RealPromote> ComplexPromote; 85362968b57SPedro Giffuni+ typedef Type ValueType; 85462968b57SPedro Giffuni+ 85562968b57SPedro Giffuni+ typedef VigraTrueType isIntegral; 85662968b57SPedro Giffuni+ typedef VigraTrueType isScalar; 85762968b57SPedro Giffuni+ typedef VigraTrueType isSigned; 85862968b57SPedro Giffuni+ typedef VigraTrueType isOrdered; 85962968b57SPedro Giffuni+ typedef VigraFalseType isComplex; 86062968b57SPedro Giffuni+ 86162968b57SPedro Giffuni+ static long long zero() { return 0; } 86262968b57SPedro Giffuni+ static long long one() { return 1; } 86362968b57SPedro Giffuni+ static long long nonZero() { return 1; } 86462968b57SPedro Giffuni+ static long long min() { return LLONG_MIN; } 86562968b57SPedro Giffuni+ static long long max() { return LLONG_MAX; } 86662968b57SPedro Giffuni+ 86762968b57SPedro Giffuni+#ifdef NO_INLINE_STATIC_CONST_DEFINITION 86862968b57SPedro Giffuni+ enum { minConst = LONG_MIN, maxConst = LLONG_MAX }; 86962968b57SPedro Giffuni+#else 87062968b57SPedro Giffuni+ static const long long minConst = LLONG_MIN; 87162968b57SPedro Giffuni+ static const long long maxConst = LLONG_MAX; 87262968b57SPedro Giffuni+#endif 87362968b57SPedro Giffuni+ 87462968b57SPedro Giffuni+ static Promote toPromote(long long v) { return v; } 87562968b57SPedro Giffuni+ static RealPromote toRealPromote(long long v) { return v; } 87662968b57SPedro Giffuni+ static long long fromPromote(Promote v) { return v; } 87762968b57SPedro Giffuni+ static long long fromRealPromote(RealPromote v) { 87862968b57SPedro Giffuni+ return ((v < 0.0) 87962968b57SPedro Giffuni+ ? ((v < (RealPromote)LLONG_MIN) 88062968b57SPedro Giffuni+ ? LLONG_MIN 88162968b57SPedro Giffuni+ : static_cast<long long>(v - 0.5)) 88262968b57SPedro Giffuni+ : ((v > (RealPromote)LLONG_MAX) 88362968b57SPedro Giffuni+ ? LLONG_MAX 88462968b57SPedro Giffuni+ : static_cast<long long>(v + 0.5))); 88562968b57SPedro Giffuni+ } 88662968b57SPedro Giffuni+}; 88762968b57SPedro Giffuni+ 88862968b57SPedro Giffuni+template<> 88962968b57SPedro Giffuni+struct NumericTraits<unsigned long long> 89062968b57SPedro Giffuni+{ 89162968b57SPedro Giffuni+ typedef unsigned long long Type; 89262968b57SPedro Giffuni+ typedef unsigned long long Promote; 89362968b57SPedro Giffuni+ typedef double RealPromote; 89462968b57SPedro Giffuni+ typedef std::complex<RealPromote> ComplexPromote; 89562968b57SPedro Giffuni+ typedef Type ValueType; 89662968b57SPedro Giffuni+ 89762968b57SPedro Giffuni+ typedef VigraTrueType isIntegral; 89862968b57SPedro Giffuni+ typedef VigraTrueType isScalar; 89962968b57SPedro Giffuni+ typedef VigraFalseType isSigned; 90062968b57SPedro Giffuni+ typedef VigraTrueType isOrdered; 90162968b57SPedro Giffuni+ typedef VigraFalseType isComplex; 90262968b57SPedro Giffuni+ 90362968b57SPedro Giffuni+ static unsigned long long zero() { return 0; } 90462968b57SPedro Giffuni+ static unsigned long long one() { return 1; } 90562968b57SPedro Giffuni+ static unsigned long long nonZero() { return 1; } 90662968b57SPedro Giffuni+ static unsigned long long min() { return 0; } 90762968b57SPedro Giffuni+ static unsigned long long max() { return ULLONG_MAX; } 90862968b57SPedro Giffuni+ 90962968b57SPedro Giffuni+#ifdef NO_INLINE_STATIC_CONST_DEFINITION 91062968b57SPedro Giffuni+ enum { minConst = 0, maxConst = ULLONG_MAX }; 91162968b57SPedro Giffuni+#else 91262968b57SPedro Giffuni+ static const unsigned long long minConst = 0; 91362968b57SPedro Giffuni+ static const unsigned long long maxConst = ULLONG_MAX; 91462968b57SPedro Giffuni+#endif 91562968b57SPedro Giffuni+ 91662968b57SPedro Giffuni+ static Promote toPromote(unsigned long long v) { return v; } 91762968b57SPedro Giffuni+ static RealPromote toRealPromote(unsigned long long v) { return v; } 91862968b57SPedro Giffuni+ static unsigned long long fromPromote(Promote v) { return v; } 91962968b57SPedro Giffuni+ static unsigned long long fromRealPromote(RealPromote v) { 92062968b57SPedro Giffuni+ return ((v < 0.0) 92162968b57SPedro Giffuni+ ? 0 92262968b57SPedro Giffuni+ : ((v > (RealPromote)ULLONG_MAX) 92362968b57SPedro Giffuni+ ? ULLONG_MAX 92462968b57SPedro Giffuni+ : static_cast<unsigned long long>(v + 0.5))); 92562968b57SPedro Giffuni+ } 92662968b57SPedro Giffuni+}; 92762968b57SPedro Giffuni+#endif 92862968b57SPedro Giffuni+ 92962968b57SPedro Giffuni template<> 93062968b57SPedro Giffuni struct NumericTraits<unsigned long> 93162968b57SPedro Giffuni { 93262968b57SPedro Giffuni@@ -1050,6 +1134,7 @@ struct NumericTraits<double> 93362968b57SPedro Giffuni static double fromRealPromote(RealPromote v) { return v; } 93462968b57SPedro Giffuni }; 93562968b57SPedro Giffuni 93662968b57SPedro Giffuni+#ifdef VIGRA_HAS_LONG_DOUBLE 93762968b57SPedro Giffuni template<> 93862968b57SPedro Giffuni struct NumericTraits<long double> 93962968b57SPedro Giffuni { 94062968b57SPedro Giffuni@@ -1079,6 +1164,7 @@ struct NumericTraits<long double> 94162968b57SPedro Giffuni static long double fromPromote(Promote v) { return v; } 94262968b57SPedro Giffuni static long double fromRealPromote(RealPromote v) { return v; } 94362968b57SPedro Giffuni }; 94462968b57SPedro Giffuni+#endif 94562968b57SPedro Giffuni 94662968b57SPedro Giffuni #ifndef NO_PARTIAL_TEMPLATE_SPECIALIZATION 94762968b57SPedro Giffuni 94862968b57SPedro Giffuni@@ -1158,9 +1244,15 @@ VIGRA_DEFINE_NORM_TRAITS(int) 94962968b57SPedro Giffuni VIGRA_DEFINE_NORM_TRAITS(unsigned int) 95062968b57SPedro Giffuni VIGRA_DEFINE_NORM_TRAITS(long) 95162968b57SPedro Giffuni VIGRA_DEFINE_NORM_TRAITS(unsigned long) 95262968b57SPedro Giffuni+#ifdef VIGRA_HAS_LONG_LONG 95362968b57SPedro Giffuni+VIGRA_DEFINE_NORM_TRAITS(long long) 95462968b57SPedro Giffuni+VIGRA_DEFINE_NORM_TRAITS(unsigned long long) 95562968b57SPedro Giffuni+#endif 95662968b57SPedro Giffuni VIGRA_DEFINE_NORM_TRAITS(float) 95762968b57SPedro Giffuni VIGRA_DEFINE_NORM_TRAITS(double) 95862968b57SPedro Giffuni+#ifdef VIGRA_HAS_LONG_DOUBLE 95962968b57SPedro Giffuni VIGRA_DEFINE_NORM_TRAITS(long double) 96062968b57SPedro Giffuni+#endif 96162968b57SPedro Giffuni 96262968b57SPedro Giffuni #ifdef LLONG_MAX 96362968b57SPedro Giffuni VIGRA_DEFINE_NORM_TRAITS(long long) 96462968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/orientedtensorfilters.hxx misc/build/vigra1.6.0/include/vigra/orientedtensorfilters.hxx 96562968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/orientedtensorfilters.hxx 2008-08-13 08:15:40.000000000 -0500 96662968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/orientedtensorfilters.hxx 2012-09-19 17:30:24.000000000 -0500 96762968b57SPedro Giffuni@@ -435,7 +435,7 @@ class Sin6RingKernel 96862968b57SPedro Giffuni if(x == 0 && y == 0) 96962968b57SPedro Giffuni return weights_(radius_, radius_); 97062968b57SPedro Giffuni double d = dot(vectors_(x+radius_, y+radius_), v); 97162968b57SPedro Giffuni- return VIGRA_CSTD::pow(1.0 - d * d, 3) * weights_(x+radius_, y+radius_); 97262968b57SPedro Giffuni+ return VIGRA_CSTD::pow(1.0 - d * d, 3.0) * weights_(x+radius_, y+radius_); 97362968b57SPedro Giffuni } 97462968b57SPedro Giffuni }; 97562968b57SPedro Giffuni 97662968b57SPedro Giffuni@@ -456,7 +456,7 @@ class Sin6Kernel 97762968b57SPedro Giffuni if(x == 0 && y == 0) 97862968b57SPedro Giffuni return weights_(radius_, radius_); 97962968b57SPedro Giffuni double d = dot(vectors_(x+radius_, y+radius_), v); 98062968b57SPedro Giffuni- return VIGRA_CSTD::pow(1.0 - d * d, 3) * weights_(x+radius_, y+radius_); 98162968b57SPedro Giffuni+ return VIGRA_CSTD::pow(1.0 - d * d, 3.0) * weights_(x+radius_, y+radius_); 98262968b57SPedro Giffuni } 98362968b57SPedro Giffuni }; 98462968b57SPedro Giffuni 98562968b57SPedro Giffuni@@ -477,7 +477,7 @@ class Cos6RingKernel 98662968b57SPedro Giffuni if(x == 0 && y == 0) 98762968b57SPedro Giffuni return weights_(radius_, radius_); 98862968b57SPedro Giffuni double d = dot(vectors_(x+radius_, y+radius_), v); 98962968b57SPedro Giffuni- return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3)) * weights_(x+radius_, y+radius_); 99062968b57SPedro Giffuni+ return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3.0)) * weights_(x+radius_, y+radius_); 99162968b57SPedro Giffuni } 99262968b57SPedro Giffuni }; 99362968b57SPedro Giffuni 99462968b57SPedro Giffuni@@ -498,7 +498,7 @@ class Cos6Kernel 99562968b57SPedro Giffuni if(x == 0 && y == 0) 99662968b57SPedro Giffuni return weights_(radius_, radius_); 99762968b57SPedro Giffuni double d = dot(vectors_(x+radius_, y+radius_), v); 99862968b57SPedro Giffuni- return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3)) * weights_(x+radius_, y+radius_); 99962968b57SPedro Giffuni+ return (1.0 - VIGRA_CSTD::pow(1.0 - d * d, 3.0)) * weights_(x+radius_, y+radius_); 100062968b57SPedro Giffuni } 100162968b57SPedro Giffuni }; 100262968b57SPedro Giffuni 100362968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/polynomial.hxx misc/build/vigra1.6.0/include/vigra/polynomial.hxx 100462968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/polynomial.hxx 2008-08-13 08:15:40.000000000 -0500 100562968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/polynomial.hxx 2012-09-19 17:30:24.000000000 -0500 100662968b57SPedro Giffuni@@ -119,10 +119,10 @@ class PolynomialView 100762968b57SPedro Giffuni of subsequent algorithms (especially root finding) performed on the 100862968b57SPedro Giffuni polynomial. 100962968b57SPedro Giffuni */ 101062968b57SPedro Giffuni- PolynomialView(T * coeffs, unsigned int order, double epsilon = 1.0e-14) 101162968b57SPedro Giffuni+ PolynomialView(T * coeffs, unsigned int ord, double eps = 1.0e-14) 101262968b57SPedro Giffuni : coeffs_(coeffs), 101362968b57SPedro Giffuni- order_(order), 101462968b57SPedro Giffuni- epsilon_(epsilon) 101562968b57SPedro Giffuni+ order_(ord), 101662968b57SPedro Giffuni+ epsilon_(eps) 101762968b57SPedro Giffuni {} 101862968b57SPedro Giffuni 101962968b57SPedro Giffuni /// Access the coefficient of x^i 102062968b57SPedro Giffuni@@ -245,16 +245,16 @@ class PolynomialView 102162968b57SPedro Giffuni { epsilon_ = eps; } 102262968b57SPedro Giffuni 102362968b57SPedro Giffuni protected: 102462968b57SPedro Giffuni- PolynomialView(double epsilon = 1e-14) 102562968b57SPedro Giffuni+ PolynomialView(double eps = 1e-14) 102662968b57SPedro Giffuni : coeffs_(0), 102762968b57SPedro Giffuni order_(0), 102862968b57SPedro Giffuni- epsilon_(epsilon) 102962968b57SPedro Giffuni+ epsilon_(eps) 103062968b57SPedro Giffuni {} 103162968b57SPedro Giffuni 103262968b57SPedro Giffuni- void setCoeffs(T * coeffs, unsigned int order) 103362968b57SPedro Giffuni+ void setCoeffs(T * coeffs, unsigned int ord) 103462968b57SPedro Giffuni { 103562968b57SPedro Giffuni coeffs_ = coeffs; 103662968b57SPedro Giffuni- order_ = order; 103762968b57SPedro Giffuni+ order_ = ord; 103862968b57SPedro Giffuni } 103962968b57SPedro Giffuni 104062968b57SPedro Giffuni T * coeffs_; 104162968b57SPedro Giffuni@@ -397,9 +397,9 @@ PolynomialView<T>::deflateConjugatePair( 104262968b57SPedro Giffuni 104362968b57SPedro Giffuni template <class T> 104462968b57SPedro Giffuni void 104562968b57SPedro Giffuni-PolynomialView<T>::minimizeOrder(double epsilon) 104662968b57SPedro Giffuni+PolynomialView<T>::minimizeOrder(double eps) 104762968b57SPedro Giffuni { 104862968b57SPedro Giffuni- while(std::abs(coeffs_[order_]) <= epsilon && order_ > 0) 104962968b57SPedro Giffuni+ while(std::abs(coeffs_[order_]) <= eps && order_ > 0) 105062968b57SPedro Giffuni --order_; 105162968b57SPedro Giffuni } 105262968b57SPedro Giffuni 105362968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/recursiveconvolution.hxx misc/build/vigra1.6.0/include/vigra/recursiveconvolution.hxx 105462968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/recursiveconvolution.hxx 2008-08-13 08:15:40.000000000 -0500 105562968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/recursiveconvolution.hxx 2012-09-19 17:30:24.000000000 -0500 105662968b57SPedro Giffuni@@ -261,16 +261,16 @@ void recursiveFilterLine(SrcIterator is, 105762968b57SPedro Giffuni { 105862968b57SPedro Giffuni // correction factors for b 105962968b57SPedro Giffuni double bright = b; 106062968b57SPedro Giffuni- double bleft = VIGRA_CSTD::pow(b, w); 106162968b57SPedro Giffuni+ double bleft = VIGRA_CSTD::pow(b, (double)w); 106262968b57SPedro Giffuni 106362968b57SPedro Giffuni for(x=w-1; x>=0; --x, --is, --id) 106462968b57SPedro Giffuni { 106562968b57SPedro Giffuni TempType f = b * old; 106662968b57SPedro Giffuni old = as(is) + f; 106762968b57SPedro Giffuni- double norm = (1.0 - b) / (1.0 + b - bleft - bright); 106862968b57SPedro Giffuni+ double norm2 = (1.0 - b) / (1.0 + b - bleft - bright); 106962968b57SPedro Giffuni bleft /= b; 107062968b57SPedro Giffuni bright *= b; 107162968b57SPedro Giffuni- ad.set(norm * (line[x] + f), id); 107262968b57SPedro Giffuni+ ad.set(norm2 * (line[x] + f), id); 107362968b57SPedro Giffuni } 107462968b57SPedro Giffuni } 107562968b57SPedro Giffuni else if(border == BORDER_TREATMENT_AVOID) 107662968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/rgbvalue.hxx misc/build/vigra1.6.0/include/vigra/rgbvalue.hxx 107762968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/rgbvalue.hxx 2008-08-13 08:15:41.000000000 -0500 107862968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/rgbvalue.hxx 2012-09-19 17:30:24.000000000 -0500 107962968b57SPedro Giffuni@@ -39,6 +39,10 @@ 108062968b57SPedro Giffuni #ifndef VIGRA_RGBVALUE_HXX 108162968b57SPedro Giffuni #define VIGRA_RGBVALUE_HXX 108262968b57SPedro Giffuni 108362968b57SPedro Giffuni+#if defined __GNUC__ 108462968b57SPedro Giffuni+#pragma GCC system_header 108562968b57SPedro Giffuni+#endif 108662968b57SPedro Giffuni+ 108762968b57SPedro Giffuni #include <cmath> // abs(double) 108862968b57SPedro Giffuni #include <cstdlib> // abs(int) 108962968b57SPedro Giffuni #include "config.hxx" 109062968b57SPedro Giffuni@@ -702,8 +706,6 @@ operator/=(RGBValue<V, RIDX, GIDX, BIDX> 109162968b57SPedro Giffuni return l; 109262968b57SPedro Giffuni } 109362968b57SPedro Giffuni 109462968b57SPedro Giffuni-using VIGRA_CSTD::abs; 109562968b57SPedro Giffuni- 109662968b57SPedro Giffuni /// component-wise absolute value 109762968b57SPedro Giffuni template <class T, unsigned int RIDX, unsigned int GIDX, unsigned int BIDX> 109862968b57SPedro Giffuni inline 109962968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/separableconvolution.hxx misc/build/vigra1.6.0/include/vigra/separableconvolution.hxx 110062968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/separableconvolution.hxx 2008-08-13 08:15:41.000000000 -0500 110162968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/separableconvolution.hxx 2012-09-19 17:30:24.000000000 -0500 110262968b57SPedro Giffuni@@ -1022,11 +1022,11 @@ class Kernel1D 110362968b57SPedro Giffuni */ 110462968b57SPedro Giffuni InitProxy operator=(value_type const & v) 110562968b57SPedro Giffuni { 110662968b57SPedro Giffuni- int size = right_ - left_ + 1; 110762968b57SPedro Giffuni+ int sz = right_ - left_ + 1; 110862968b57SPedro Giffuni for(unsigned int i=0; i<kernel_.size(); ++i) kernel_[i] = v; 110962968b57SPedro Giffuni- norm_ = (double)size*v; 111062968b57SPedro Giffuni+ norm_ = (double)sz*v; 111162968b57SPedro Giffuni 111262968b57SPedro Giffuni- return InitProxy(kernel_.begin(), size, norm_); 111362968b57SPedro Giffuni+ return InitProxy(kernel_.begin(), sz, norm_); 111462968b57SPedro Giffuni } 111562968b57SPedro Giffuni 111662968b57SPedro Giffuni /** Destructor. 111762968b57SPedro Giffuni@@ -1663,8 +1663,8 @@ class Kernel1D 111862968b57SPedro Giffuni }; 111962968b57SPedro Giffuni 112062968b57SPedro Giffuni template <class ARITHTYPE> 112162968b57SPedro Giffuni-void Kernel1D<ARITHTYPE>::normalize(value_type norm, 112262968b57SPedro Giffuni- unsigned int derivativeOrder, 112362968b57SPedro Giffuni+void Kernel1D<ARITHTYPE>::normalize(value_type normFactor, 112462968b57SPedro Giffuni+ unsigned int derivOrder, 112562968b57SPedro Giffuni double offset) 112662968b57SPedro Giffuni { 112762968b57SPedro Giffuni typedef typename NumericTraits<value_type>::RealPromote TmpType; 112862968b57SPedro Giffuni@@ -1673,7 +1673,7 @@ void Kernel1D<ARITHTYPE>::normalize(valu 112962968b57SPedro Giffuni Iterator k = kernel_.begin(); 113062968b57SPedro Giffuni TmpType sum = NumericTraits<TmpType>::zero(); 113162968b57SPedro Giffuni 113262968b57SPedro Giffuni- if(derivativeOrder == 0) 113362968b57SPedro Giffuni+ if(derivOrder == 0) 113462968b57SPedro Giffuni { 113562968b57SPedro Giffuni for(; k < kernel_.end(); ++k) 113662968b57SPedro Giffuni { 113762968b57SPedro Giffuni@@ -1683,11 +1683,11 @@ void Kernel1D<ARITHTYPE>::normalize(valu 113862968b57SPedro Giffuni else 113962968b57SPedro Giffuni { 114062968b57SPedro Giffuni unsigned int faculty = 1; 114162968b57SPedro Giffuni- for(unsigned int i = 2; i <= derivativeOrder; ++i) 114262968b57SPedro Giffuni+ for(unsigned int i = 2; i <= derivOrder; ++i) 114362968b57SPedro Giffuni faculty *= i; 114462968b57SPedro Giffuni for(double x = left() + offset; k < kernel_.end(); ++x, ++k) 114562968b57SPedro Giffuni { 114662968b57SPedro Giffuni- sum += *k * VIGRA_CSTD::pow(-x, int(derivativeOrder)) / faculty; 114762968b57SPedro Giffuni+ sum += *k * VIGRA_CSTD::pow(-x, (double)derivOrder) / faculty; 114862968b57SPedro Giffuni } 114962968b57SPedro Giffuni } 115062968b57SPedro Giffuni 115162968b57SPedro Giffuni@@ -1695,21 +1695,21 @@ void Kernel1D<ARITHTYPE>::normalize(valu 115262968b57SPedro Giffuni "Kernel1D<ARITHTYPE>::normalize(): " 115362968b57SPedro Giffuni "Cannot normalize a kernel with sum = 0"); 115462968b57SPedro Giffuni // normalize 115562968b57SPedro Giffuni- sum = norm / sum; 115662968b57SPedro Giffuni+ sum = normFactor / sum; 115762968b57SPedro Giffuni k = kernel_.begin(); 115862968b57SPedro Giffuni for(; k != kernel_.end(); ++k) 115962968b57SPedro Giffuni { 116062968b57SPedro Giffuni *k = *k * sum; 116162968b57SPedro Giffuni } 116262968b57SPedro Giffuni 116362968b57SPedro Giffuni- norm_ = norm; 116462968b57SPedro Giffuni+ norm_ = normFactor; 116562968b57SPedro Giffuni } 116662968b57SPedro Giffuni 116762968b57SPedro Giffuni /***********************************************************************/ 116862968b57SPedro Giffuni 116962968b57SPedro Giffuni template <class ARITHTYPE> 117062968b57SPedro Giffuni void Kernel1D<ARITHTYPE>::initGaussian(double std_dev, 117162968b57SPedro Giffuni- value_type norm) 117262968b57SPedro Giffuni+ value_type normFactor) 117362968b57SPedro Giffuni { 117462968b57SPedro Giffuni vigra_precondition(std_dev >= 0.0, 117562968b57SPedro Giffuni "Kernel1D::initGaussian(): Standard deviation must be >= 0."); 117662968b57SPedro Giffuni@@ -1742,8 +1742,8 @@ void Kernel1D<ARITHTYPE>::initGaussian(d 117762968b57SPedro Giffuni right_ = 0; 117862968b57SPedro Giffuni } 117962968b57SPedro Giffuni 118062968b57SPedro Giffuni- if(norm != 0.0) 118162968b57SPedro Giffuni- normalize(norm); 118262968b57SPedro Giffuni+ if(normFactor != 0.0) 118362968b57SPedro Giffuni+ normalize(normFactor); 118462968b57SPedro Giffuni else 118562968b57SPedro Giffuni norm_ = 1.0; 118662968b57SPedro Giffuni 118762968b57SPedro Giffuni@@ -1755,7 +1755,7 @@ void Kernel1D<ARITHTYPE>::initGaussian(d 118862968b57SPedro Giffuni 118962968b57SPedro Giffuni template <class ARITHTYPE> 119062968b57SPedro Giffuni void Kernel1D<ARITHTYPE>::initDiscreteGaussian(double std_dev, 119162968b57SPedro Giffuni- value_type norm) 119262968b57SPedro Giffuni+ value_type normFactor) 119362968b57SPedro Giffuni { 119462968b57SPedro Giffuni vigra_precondition(std_dev >= 0.0, 119562968b57SPedro Giffuni "Kernel1D::initDiscreteGaussian(): Standard deviation must be >= 0."); 119662968b57SPedro Giffuni@@ -1797,7 +1797,7 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa 119762968b57SPedro Giffuni er += warray[i]; 119862968b57SPedro Giffuni } 119962968b57SPedro Giffuni 120062968b57SPedro Giffuni- double scale = norm / (2*er - warray[0]); 120162968b57SPedro Giffuni+ double scale = normFactor / (2*er - warray[0]); 120262968b57SPedro Giffuni 120362968b57SPedro Giffuni initExplicitly(-radius, radius); 120462968b57SPedro Giffuni iterator c = center(); 120562968b57SPedro Giffuni@@ -1810,12 +1810,12 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa 120662968b57SPedro Giffuni else 120762968b57SPedro Giffuni { 120862968b57SPedro Giffuni kernel_.erase(kernel_.begin(), kernel_.end()); 120962968b57SPedro Giffuni- kernel_.push_back(norm); 121062968b57SPedro Giffuni+ kernel_.push_back(normFactor); 121162968b57SPedro Giffuni left_ = 0; 121262968b57SPedro Giffuni right_ = 0; 121362968b57SPedro Giffuni } 121462968b57SPedro Giffuni 121562968b57SPedro Giffuni- norm_ = norm; 121662968b57SPedro Giffuni+ norm_ = normFactor; 121762968b57SPedro Giffuni 121862968b57SPedro Giffuni // best border treatment for Gaussians is BORDER_TREATMENT_REFLECT 121962968b57SPedro Giffuni border_treatment_ = BORDER_TREATMENT_REFLECT; 122062968b57SPedro Giffuni@@ -1826,15 +1826,15 @@ void Kernel1D<ARITHTYPE>::initDiscreteGa 122162968b57SPedro Giffuni template <class ARITHTYPE> 122262968b57SPedro Giffuni void 122362968b57SPedro Giffuni Kernel1D<ARITHTYPE>::initGaussianDerivative(double std_dev, 122462968b57SPedro Giffuni- int order, 122562968b57SPedro Giffuni- value_type norm) 122662968b57SPedro Giffuni+ int order, 122762968b57SPedro Giffuni+ value_type normFactor) 122862968b57SPedro Giffuni { 122962968b57SPedro Giffuni vigra_precondition(order >= 0, 123062968b57SPedro Giffuni "Kernel1D::initGaussianDerivative(): Order must be >= 0."); 123162968b57SPedro Giffuni 123262968b57SPedro Giffuni if(order == 0) 123362968b57SPedro Giffuni { 123462968b57SPedro Giffuni- initGaussian(std_dev, norm); 123562968b57SPedro Giffuni+ initGaussian(std_dev, normFactor); 123662968b57SPedro Giffuni return; 123762968b57SPedro Giffuni } 123862968b57SPedro Giffuni 123962968b57SPedro Giffuni@@ -1865,7 +1865,7 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat 124062968b57SPedro Giffuni 124162968b57SPedro Giffuni // remove DC, but only if kernel correction is permitted by a non-zero 124262968b57SPedro Giffuni // value for norm 124362968b57SPedro Giffuni- if(norm != 0.0) 124462968b57SPedro Giffuni+ if(normFactor != 0.0) 124562968b57SPedro Giffuni { 124662968b57SPedro Giffuni for(unsigned int i=0; i < kernel_.size(); ++i) 124762968b57SPedro Giffuni { 124862968b57SPedro Giffuni@@ -1876,8 +1876,8 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat 124962968b57SPedro Giffuni left_ = -radius; 125062968b57SPedro Giffuni right_ = radius; 125162968b57SPedro Giffuni 125262968b57SPedro Giffuni- if(norm != 0.0) 125362968b57SPedro Giffuni- normalize(norm, order); 125462968b57SPedro Giffuni+ if(normFactor != 0.0) 125562968b57SPedro Giffuni+ normalize(normFactor, order); 125662968b57SPedro Giffuni else 125762968b57SPedro Giffuni norm_ = 1.0; 125862968b57SPedro Giffuni 125962968b57SPedro Giffuni@@ -1891,7 +1891,7 @@ Kernel1D<ARITHTYPE>::initGaussianDerivat 126062968b57SPedro Giffuni template <class ARITHTYPE> 126162968b57SPedro Giffuni void 126262968b57SPedro Giffuni Kernel1D<ARITHTYPE>::initBinomial(int radius, 126362968b57SPedro Giffuni- value_type norm) 126462968b57SPedro Giffuni+ value_type normFactor) 126562968b57SPedro Giffuni { 126662968b57SPedro Giffuni vigra_precondition(radius > 0, 126762968b57SPedro Giffuni "Kernel1D::initBinomial(): Radius must be > 0."); 126862968b57SPedro Giffuni@@ -1921,12 +1921,12 @@ Kernel1D<ARITHTYPE>::initBinomial(int ra 126962968b57SPedro Giffuni 127062968b57SPedro Giffuni for(i=0; i<=radius*2+1; ++i) 127162968b57SPedro Giffuni { 127262968b57SPedro Giffuni- kernel_.push_back(kernel[i] * norm); 127362968b57SPedro Giffuni+ kernel_.push_back(kernel[i] * normFactor); 127462968b57SPedro Giffuni } 127562968b57SPedro Giffuni 127662968b57SPedro Giffuni left_ = -radius; 127762968b57SPedro Giffuni right_ = radius; 127862968b57SPedro Giffuni- norm_ = norm; 127962968b57SPedro Giffuni+ norm_ = normFactor; 128062968b57SPedro Giffuni 128162968b57SPedro Giffuni // best border treatment for Binomial is BORDER_TREATMENT_REFLECT 128262968b57SPedro Giffuni border_treatment_ = BORDER_TREATMENT_REFLECT; 128362968b57SPedro Giffuni@@ -1936,7 +1936,7 @@ Kernel1D<ARITHTYPE>::initBinomial(int ra 128462968b57SPedro Giffuni 128562968b57SPedro Giffuni template <class ARITHTYPE> 128662968b57SPedro Giffuni void Kernel1D<ARITHTYPE>::initAveraging(int radius, 128762968b57SPedro Giffuni- value_type norm) 128862968b57SPedro Giffuni+ value_type normFactor) 128962968b57SPedro Giffuni { 129062968b57SPedro Giffuni vigra_precondition(radius > 0, 129162968b57SPedro Giffuni "Kernel1D::initAveraging(): Radius must be > 0."); 129262968b57SPedro Giffuni@@ -1950,12 +1950,12 @@ void Kernel1D<ARITHTYPE>::initAveraging( 129362968b57SPedro Giffuni 129462968b57SPedro Giffuni for(int i=0; i<=radius*2+1; ++i) 129562968b57SPedro Giffuni { 129662968b57SPedro Giffuni- kernel_.push_back(scale * norm); 129762968b57SPedro Giffuni+ kernel_.push_back(scale * normFactor); 129862968b57SPedro Giffuni } 129962968b57SPedro Giffuni 130062968b57SPedro Giffuni left_ = -radius; 130162968b57SPedro Giffuni right_ = radius; 130262968b57SPedro Giffuni- norm_ = norm; 130362968b57SPedro Giffuni+ norm_ = normFactor; 130462968b57SPedro Giffuni 130562968b57SPedro Giffuni // best border treatment for Averaging is BORDER_TREATMENT_CLIP 130662968b57SPedro Giffuni border_treatment_ = BORDER_TREATMENT_CLIP; 130762968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/sized_int.hxx misc/build/vigra1.6.0/include/vigra/sized_int.hxx 130862968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/sized_int.hxx 2008-08-13 08:15:41.000000000 -0500 130962968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/sized_int.hxx 2012-09-19 17:30:24.000000000 -0500 131062968b57SPedro Giffuni@@ -73,11 +73,15 @@ struct SelectIntegerType<SIZE, Int_type_ 131162968b57SPedro Giffuni typedef Int_type_not_supported_on_this_platform type; 131262968b57SPedro Giffuni }; 131362968b57SPedro Giffuni 131462968b57SPedro Giffuni+#if defined __SUNPRO_CC 131562968b57SPedro Giffuni+#pragma disable_warn 131662968b57SPedro Giffuni+#endif 131762968b57SPedro Giffuni+ 131862968b57SPedro Giffuni template<class LIST> 131962968b57SPedro Giffuni struct SelectBiggestIntegerType 132062968b57SPedro Giffuni { 132162968b57SPedro Giffuni- enum { cursize = LIST::size, 132262968b57SPedro Giffuni- nextsize = SelectBiggestIntegerType<typename LIST::next>::size, 132362968b57SPedro Giffuni+ enum { cursize = static_cast< int >(LIST::size), 132462968b57SPedro Giffuni+ nextsize = static_cast< int >(SelectBiggestIntegerType<typename LIST::next>::size), 132562968b57SPedro Giffuni size = (cursize < nextsize) ? nextsize : cursize }; 132662968b57SPedro Giffuni typedef typename 132762968b57SPedro Giffuni IfBool<(cursize < nextsize), 132862968b57SPedro Giffuni@@ -86,6 +90,10 @@ struct SelectBiggestIntegerType 132962968b57SPedro Giffuni type; 133062968b57SPedro Giffuni }; 133162968b57SPedro Giffuni 133262968b57SPedro Giffuni+#if defined __SUNPRO_CC 133362968b57SPedro Giffuni+#pragma enable_warn 133462968b57SPedro Giffuni+#endif 133562968b57SPedro Giffuni+ 133662968b57SPedro Giffuni template<> 133762968b57SPedro Giffuni struct SelectBiggestIntegerType<Int_type_not_supported_on_this_platform> 133862968b57SPedro Giffuni { 133962968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/splines.hxx misc/build/vigra1.6.0/include/vigra/splines.hxx 134062968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/splines.hxx 2008-08-13 08:15:41.000000000 -0500 134162968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/splines.hxx 2012-09-19 17:30:24.000000000 -0500 134262968b57SPedro Giffuni@@ -108,8 +108,8 @@ class BSplineBase 134362968b57SPedro Giffuni /** Create functor for gevine derivative of the spline. The spline's order 134462968b57SPedro Giffuni is specified spline by the template argument <TT>ORDER</tt>. 134562968b57SPedro Giffuni */ 134662968b57SPedro Giffuni- explicit BSplineBase(unsigned int derivativeOrder = 0) 134762968b57SPedro Giffuni- : s1_(derivativeOrder) 134862968b57SPedro Giffuni+ explicit BSplineBase(unsigned int derivOrder = 0) 134962968b57SPedro Giffuni+ : s1_(derivOrder) 135062968b57SPedro Giffuni {} 135162968b57SPedro Giffuni 135262968b57SPedro Giffuni /** Unary function call. 135362968b57SPedro Giffuni@@ -280,8 +280,8 @@ class BSplineBase<0, T> 135462968b57SPedro Giffuni typedef T result_type; 135562968b57SPedro Giffuni enum StaticOrder { order = 0 }; 135662968b57SPedro Giffuni 135762968b57SPedro Giffuni- explicit BSplineBase(unsigned int derivativeOrder = 0) 135862968b57SPedro Giffuni- : derivativeOrder_(derivativeOrder) 135962968b57SPedro Giffuni+ explicit BSplineBase(unsigned int derivOrder = 0) 136062968b57SPedro Giffuni+ : derivativeOrder_(derivOrder) 136162968b57SPedro Giffuni {} 136262968b57SPedro Giffuni 136362968b57SPedro Giffuni result_type operator()(argument_type x) const 136462968b57SPedro Giffuni@@ -357,8 +357,8 @@ class BSpline<1, T> 136562968b57SPedro Giffuni typedef T result_type; 136662968b57SPedro Giffuni enum StaticOrder { order = 1 }; 136762968b57SPedro Giffuni 136862968b57SPedro Giffuni- explicit BSpline(unsigned int derivativeOrder = 0) 136962968b57SPedro Giffuni- : derivativeOrder_(derivativeOrder) 137062968b57SPedro Giffuni+ explicit BSpline(unsigned int derivOrder = 0) 137162968b57SPedro Giffuni+ : derivativeOrder_(derivOrder) 137262968b57SPedro Giffuni {} 137362968b57SPedro Giffuni 137462968b57SPedro Giffuni result_type operator()(argument_type x) const 137562968b57SPedro Giffuni@@ -454,8 +454,8 @@ class BSpline<2, T> 137662968b57SPedro Giffuni typedef T result_type; 137762968b57SPedro Giffuni enum StaticOrder { order = 2 }; 137862968b57SPedro Giffuni 137962968b57SPedro Giffuni- explicit BSpline(unsigned int derivativeOrder = 0) 138062968b57SPedro Giffuni- : derivativeOrder_(derivativeOrder) 138162968b57SPedro Giffuni+ explicit BSpline(unsigned int derivOrder = 0) 138262968b57SPedro Giffuni+ : derivativeOrder_(derivOrder) 138362968b57SPedro Giffuni {} 138462968b57SPedro Giffuni 138562968b57SPedro Giffuni result_type operator()(argument_type x) const 138662968b57SPedro Giffuni@@ -583,8 +583,8 @@ class BSpline<3, T> 138762968b57SPedro Giffuni typedef T result_type; 138862968b57SPedro Giffuni enum StaticOrder { order = 3 }; 138962968b57SPedro Giffuni 139062968b57SPedro Giffuni- explicit BSpline(unsigned int derivativeOrder = 0) 139162968b57SPedro Giffuni- : derivativeOrder_(derivativeOrder) 139262968b57SPedro Giffuni+ explicit BSpline(unsigned int derivOrder = 0) 139362968b57SPedro Giffuni+ : derivativeOrder_(derivOrder) 139462968b57SPedro Giffuni {} 139562968b57SPedro Giffuni 139662968b57SPedro Giffuni result_type operator()(argument_type x) const 139762968b57SPedro Giffuni@@ -735,8 +735,8 @@ class BSpline<4, T> 139862968b57SPedro Giffuni typedef T result_type; 139962968b57SPedro Giffuni enum StaticOrder { order = 4 }; 140062968b57SPedro Giffuni 140162968b57SPedro Giffuni- explicit BSpline(unsigned int derivativeOrder = 0) 140262968b57SPedro Giffuni- : derivativeOrder_(derivativeOrder) 140362968b57SPedro Giffuni+ explicit BSpline(unsigned int derivOrder = 0) 140462968b57SPedro Giffuni+ : derivativeOrder_(derivOrder) 140562968b57SPedro Giffuni {} 140662968b57SPedro Giffuni 140762968b57SPedro Giffuni result_type operator()(argument_type x) const 140862968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/static_assert.hxx misc/build/vigra1.6.0/include/vigra/static_assert.hxx 140962968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/static_assert.hxx 2008-08-13 08:15:41.000000000 -0500 141062968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/static_assert.hxx 2012-09-19 17:30:24.000000000 -0500 141162968b57SPedro Giffuni@@ -115,7 +115,7 @@ assertImpl( void (*)(Predicate), typenam 141262968b57SPedro Giffuni 141362968b57SPedro Giffuni TODO: provide more assertion base classes for other (non boolean) types of tests 141462968b57SPedro Giffuni */ 141562968b57SPedro Giffuni-#if !defined(__GNUC__) || __GNUC__ > 2 141662968b57SPedro Giffuni+#if (!defined(__GNUC__) || __GNUC__ > 2) && (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x550) 141762968b57SPedro Giffuni #define VIGRA_STATIC_ASSERT(Predicate) \ 141862968b57SPedro Giffuni enum { \ 141962968b57SPedro Giffuni VIGRA_PREPROCESSOR_CONCATENATE(vigra_assertion_in_line_, __LINE__) = sizeof( \ 142062968b57SPedro Giffunidiff -uprN misc/vigra1.6.0/include/vigra/tinyvector.hxx misc/build/vigra1.6.0/include/vigra/tinyvector.hxx 142162968b57SPedro Giffuni--- misc/vigra1.6.0/include/vigra/tinyvector.hxx 2008-08-13 08:15:42.000000000 -0500 142262968b57SPedro Giffuni+++ misc/build/vigra1.6.0/include/vigra/tinyvector.hxx 2012-09-19 17:30:24.000000000 -0500 142362968b57SPedro Giffuni@@ -39,6 +39,10 @@ 142462968b57SPedro Giffuni #ifndef VIGRA_TINYVECTOR_HXX 142562968b57SPedro Giffuni #define VIGRA_TINYVECTOR_HXX 142662968b57SPedro Giffuni 142762968b57SPedro Giffuni+#if defined __GNUC__ 142862968b57SPedro Giffuni+#pragma GCC system_header 142962968b57SPedro Giffuni+#endif 143062968b57SPedro Giffuni+ 143162968b57SPedro Giffuni #include <cmath> // abs(double) 143262968b57SPedro Giffuni #include <cstdlib> // abs(int) 143362968b57SPedro Giffuni #include <iosfwd> // ostream 143462968b57SPedro Giffuni@@ -49,7 +53,6 @@ 143562968b57SPedro Giffuni 143662968b57SPedro Giffuni namespace vigra { 143762968b57SPedro Giffuni 143862968b57SPedro Giffuni-using VIGRA_CSTD::abs; 143962968b57SPedro Giffuni using VIGRA_CSTD::ceil; 144062968b57SPedro Giffuni using VIGRA_CSTD::floor; 144162968b57SPedro Giffuni 144262968b57SPedro Giffuni@@ -439,9 +442,9 @@ class TinyVectorBase 144362968b57SPedro Giffuni /** Initialize from another sequence (must have length SIZE!) 144462968b57SPedro Giffuni */ 144562968b57SPedro Giffuni template <class Iterator> 144662968b57SPedro Giffuni- void init(Iterator i, Iterator end) 144762968b57SPedro Giffuni+ void init(Iterator i, Iterator iend) 144862968b57SPedro Giffuni { 144962968b57SPedro Giffuni- vigra_precondition(end-i == SIZE, 145062968b57SPedro Giffuni+ vigra_precondition(iend-i == SIZE, 145162968b57SPedro Giffuni "TinyVector::init(): Sequence has wrong size."); 145262968b57SPedro Giffuni Loop::assignCast(data_, i); 145362968b57SPedro Giffuni } 1454