We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07c6b59 commit b59207cCopy full SHA for b59207c
include/IECore/RefCounted.h
@@ -169,6 +169,16 @@ inline void intrusive_ptr_release( const IECore::RefCounted *r )
169
r->removeRef();
170
}
171
172
+/// Implementation of tbb_hasher to allow intrusive_ptrs to be used
173
+/// with tbb_concurrent_* containers.
174
+template<typename T>
175
+inline size_t tbb_hasher( const boost::intrusive_ptr<T> &ptr )
176
+{
177
+ // This is the same as what tbb uses for raw pointers
178
+ const size_t h = reinterpret_cast<size_t>( ptr.get() );
179
+ return (h >> 3) ^ h;
180
+}
181
+
182
} // namespace IECore
183
184
0 commit comments