I'm trying to split stridden data to two components using range-v3. something like this
void foo(Buffer& input, Buffer& U, Buffer& V)
{
V = ranges::move(input | ranges::v3::view::slice(0ull, input.size()) | ranges::v3::view::stride(2));
U = ranges::move(input | ranges::v3::view::slice(1ull, input.size()) | ranges::v3::view::stride(2));
}
where the Buffer is defined as std::vector<uint8_t>
For some reason it is very slow, about 20 times slower than naïve for loop. Am I doing something wrong? Is it me or library?
Using VS2015 Upd.3
I'm trying to split stridden data to two components using range-v3. something like this
where the Buffer is defined as
std::vector<uint8_t>
For some reason it is very slow, about 20 times slower than naïvefor
loop. Am I doing something wrong? Is it me or library? Using VS2015 Upd.3