AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Apache License 2.0
2.71k stars 660 forks source link

[BUG] OpAccumulator does not compile with C++20 #1719

Closed michaelnikelsky closed 11 months ago

michaelnikelsky commented 11 months ago

Environment

**Operating System: Rocky Linux 8

Describe the bug

class OpAccumulator in ValueTransformer.h uses parallel_reduce but does not fulfill its requirements. The causes OpenVDB to not work with C++20 compilers and oneTBB 2021.11 (I think starting from 2021.7 ). There is an explanation about the issue in this thread: https://github.com/oneapi-src/oneTBB/issues/965

The tbb documentation states the following: https://oneapi-src.github.io/oneTBB/main/tbb_userguide/Constraints.html https://spec.oneapi.io/versions/latest/elements/oneTBB/source/named_requirements.html

Idclip commented 11 months ago

Hi @michaelnikelsky,

This should already be fixed on master and in v10.1 and v11.0. See commits:

3bc668615ab617e8c387e9edd798e5c05a3c1557 98176b82db8c55d7e898fef6870090cbddadd471

Can you try those versions and see if they work for you?

michaelnikelsky commented 11 months ago

I can confirm this is solved in v11.0