Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tbb to 2020 3 #2447

Merged
merged 12 commits into from
Mar 26, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use tbb version major macro for deciding to use new interface
  • Loading branch information
SteveBronder committed Mar 24, 2021
commit 91bbd128146d97cb7a0646f97770191db45bf93d
2 changes: 1 addition & 1 deletion stan/math/prim/core/init_threadpool_tbb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <tbb/tbb_stddef.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks external oneTBB since tbb/tbb_stddef.h is not found:

stan/math/prim/core/init_threadpool_tbb.hpp(8):
  catastrophic error: cannot open source file "tbb/tbb_stddef.h"
  #include <tbb/tbb_stddef.h>

TBB_VERSION_MAJOR is now defined in tbb/version.h.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! So seems we need to add another ONE_TBB compile time define.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll submit a hot fix shortly; testing it now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rok-cesnovar #2452 does the trick.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll put in a fix pr. I think we can just move #ifndef TBB_INTERFACE_NEW up since if they have that defined then we know already we are using the new interface

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that is what @hsbadr did in #2452

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly :)


#if TBB_VERSION_MAJOR == 2020
#if TBB_VERSION_MAJOR >= 2020
#ifndef TBB_INTERFACE_NEW
#define TBB_INTERFACE_NEW
#endif
Expand Down