MCPcopy Create free account
hub / github.com/RenderKit/embree / init

Method init

common/algorithms/parallel_set.h:25–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 /*! initialized the parallel set from a vector */
24 template<typename Vector>
25 void init(const Vector& in)
26 {
27 /* copy data to internal vector */
28 vec.resize(in.size());
29 parallel_for( size_t(0), in.size(), size_t(4*4096), [&](const range<size_t>& r) {
30 for (size_t i=r.begin(); i<r.end(); i++)
31 vec[i] = in[i];
32 });
33
34 /* sort the data */
35 std::vector<T> temp(in.size());
36 radix_sort<T>(vec.data(),temp.data(),vec.size());
37 }
38
39 /*! tests if some element is in the set */
40 __forceinline bool lookup(const T& elt) const {

Callers

nothing calls this directly

Calls 6

parallel_forFunction · 0.85
resizeMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected