Commit a876826d authored by Damian Kurek's avatar Damian Kurek
Browse files

testing/openvdb: fix tests for archs other than x86_64

parent fe817db5
Pipeline #81392 passed with stages
in 32 minutes and 33 seconds
......@@ -2,16 +2,27 @@
# Maintainer: Leon Marz <lmarz@cs.uni-frankfurt.de>
pkgname=openvdb
pkgver=8.0.1
pkgrel=1
pkgrel=2
pkgdesc="Sparse volume data structure and tools"
url="https://www.openvdb.org/"
arch="x86_64" # tests fail on all other arches
arch="all !s390x !mips64"
license="MPL-2.0"
makedepends="cmake openexr-dev libtbb-dev zlib-dev boost-dev python3-dev gtest-dev"
subpackages="$pkgname-static $pkgname-dev py3-$pkgname:python"
source="$pkgname-$pkgver.tar.gz::https://github.com/AcademySoftwareFoundation/openvdb/archive/v$pkgver.tar.gz"
source="$pkgname-$pkgver.tar.gz::https://github.com/AcademySoftwareFoundation/openvdb/archive/v$pkgver.tar.gz
fix_sign.patch
fix_interpolation.patch
fix_32bit_test.patch
fix_index64.patch
"
build() {
# prevent x87 float excess precision so the tests pass on x86
case "$CARCH" in
x86) CXXFLAGS="$CXXFLAGS -msse2 -mfpmath=sse";;
esac
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
......@@ -40,4 +51,8 @@ python() {
amove /usr/lib/python3*
}
sha512sums="6a5a8b637429295efa72494aef82ff92dd83092591b713f56930ccf4aab3a33806d1263bfd090c27239eab97b4fdc053288dc545e631f8a7d4ca180a32331be2 openvdb-8.0.1.tar.gz"
sha512sums="6a5a8b637429295efa72494aef82ff92dd83092591b713f56930ccf4aab3a33806d1263bfd090c27239eab97b4fdc053288dc545e631f8a7d4ca180a32331be2 openvdb-8.0.1.tar.gz
6a0ebf8017fbaa4dfe65644f43338455d5a13118983d1cdbf639225a830b1dad0cc2abef78bee4039ba81e88f575718e74676c44c5a5d930b21f0015aff2e574 fix_sign.patch
fffaedad6d0efb0913d5ba1ab342311fc2dc3a42225b5967365464a8e767de7cd327e044780bcd3b5930f8adf1d9da27d6b1b93b76f20a975f49fb69363c6cd4 fix_interpolation.patch
f44f45fdf4b1fe66a9bcc8402a85092dbc52faa6dc7a340430d97dc81ebeab394066164b57042f0221acb336145a754d4a62ba9e7bbdc53e789af8388d0fe48f fix_32bit_test.patch
b3aa661d479958afd5d6a57c4f82fb1b595c1d0b0045d3061ea358b3c0dee32977538b1348f7ed43e99afd9782e04fbe53653560012a994b5dd6b8d6db428ad7 fix_index64.patch"
--- a/openvdb/openvdb/unittest/TestAttributeArray.cc
+++ b/openvdb/openvdb/unittest/TestAttributeArray.cc
@@ -1344,7 +1344,7 @@
// as of ABI=6, the base memory requirements of an AttributeArray have been lowered
#if OPENVDB_ABI_VERSION_NUMBER >= 6
- size_t arrayMem = 40;
+ size_t arrayMem = 16 + 3 * sizeof(void *);
#else
size_t arrayMem = 64;
#endif
--- a/openvdb/openvdb/points/AttributeSet.cc
+++ b/openvdb/openvdb/points/AttributeSet.cc
@@ -1340,7 +1340,7 @@
Index64 arraylength = 0;
is.read(reinterpret_cast<char*>(&arraylength), sizeof(Index64));
- std::vector<NamePair>(size_t(arraylength)).swap(mTypes);
+ std::vector<NamePair>(Index64(arraylength)).swap(mTypes);
for (NamePair& np : mTypes) {
np.first = readString(is);
@@ -1348,7 +1348,7 @@
}
mNameMap.clear();
- std::pair<std::string, size_t> nameAndOffset;
+ std::pair<std::string, Index64> nameAndOffset;
for (Index64 n = 0; n < arraylength; ++n) {
nameAndOffset.first = readString(is);
--- a/openvdb/openvdb/tools/Interpolation.h
+++ b/openvdb/openvdb/tools/Interpolation.h
@@ -711,7 +711,7 @@
inline ValueT
BoxSampler::trilinearInterpolation(ValueT (&data)[N][N][N], const Vec3R& uvw)
{
- auto _interpolate = [](const ValueT& a, const ValueT& b, double weight)
+ auto _interpolate = [](const ValueT& a, const ValueT& b, float weight)
{
OPENVDB_NO_TYPE_CONVERSION_WARNING_BEGIN
const auto temp = (b - a) * weight;
--- a/openvdb/openvdb/tools/LevelSetUtil.h
+++ b/openvdb/openvdb/tools/LevelSetUtil.h
@@ -309,7 +309,7 @@
struct LabelBoundaryVoxels {
using ValueType = typename LeafNodeType::ValueType;
- using CharLeafNodeType = tree::LeafNode<char, LeafNodeType::LOG2DIM>;
+ using CharLeafNodeType = tree::LeafNode<signed char, LeafNodeType::LOG2DIM>;
LabelBoundaryVoxels(
ValueType isovalue, const LeafNodeType ** nodes, CharLeafNodeType ** maskNodes)
@@ -945,7 +945,7 @@
/// @brief Constructs a memory light char tree that represents the exterior region with @c +1
/// and the interior regions with @c -1.
template <class TreeType>
-inline typename TreeType::template ValueConverter<char>::Type::Ptr
+inline typename TreeType::template ValueConverter<signed char>::Type::Ptr
computeEnclosedRegionMask(const TreeType& tree, typename TreeType::ValueType isovalue,
const typename TreeType::template ValueConverter<bool>::Type* fillMask)
{
@@ -954,7 +954,7 @@
using NodeChainType = typename RootNodeType::NodeChainType;
using InternalNodeType = typename NodeChainType::template Get<1>;
- using CharTreeType = typename TreeType::template ValueConverter<char>::Type;
+ using CharTreeType = typename TreeType::template ValueConverter<signed char>::Type;
using CharLeafNodeType = typename CharTreeType::LeafNodeType;
using BoolTreeType = typename TreeType::template ValueConverter<bool>::Type;
@@ -1033,7 +1033,7 @@
extraMaskNodes.push_back(maskNodePt);
}
- char* data = maskNodePt->buffer().data();
+ signed char* data = maskNodePt->buffer().data();
typename BoolLeafNodeType::ValueOnCIter it = boundaryNode.cbeginValueOn();
for (; it; ++it) {
@@ -2290,7 +2290,7 @@
using TreeType = typename TreeAdapter<GridOrTreeType>::TreeType;
const TreeType& tree = TreeAdapter<GridOrTreeType>::tree(volume);
- using CharTreePtrType = typename TreeType::template ValueConverter<char>::Type::Ptr;
+ using CharTreePtrType = typename TreeType::template ValueConverter<signed char>::Type::Ptr;
CharTreePtrType regionMask = level_set_util_internal::computeEnclosedRegionMask(
tree, isovalue, fillMask);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment