Specialize CopyIf for serial and TBB backends
New TBB vs. old serial:
Speedup | Warn | serial | parallel | Benchmark (Type) |
---|---|---|---|---|
6.362 | 0.010592 +- 0.000159 | 0.001665 +- 0.000058 | CopyIf on 2097152 values with 104858 valid values (vtkm::Float32) | |
4.706 | 0.011221 +- 0.000152 | 0.002384 +- 0.000080 | CopyIf on 2097152 values with 104858 valid values (vtkm::Float64) | |
6.334 | 0.010586 +- 0.000181 | 0.001671 +- 0.000059 | CopyIf on 2097152 values with 104858 valid values (vtkm::Int32) | |
4.740 | 0.011330 +- 0.000147 | 0.002390 +- 0.000078 | CopyIf on 2097152 values with 104858 valid values (vtkm::Int64) | |
6.325 | 0.010580 +- 0.000150 | 0.001673 +- 0.000057 | CopyIf on 2097152 values with 104858 valid values (vtkm::UInt32) | |
9.644 | 0.010978 +- 0.000180 | 0.001138 +- 0.000053 | CopyIf on 2097152 values with 104858 valid values (vtkm::UInt8) | |
3.782 | 0.011347 +- 0.000149 | 0.003000 +- 0.000108 | CopyIf on 2097152 values with 104858 valid values (vtkm::Vec< vtkm::Float32, 4 >) | |
3.470 | ! | 0.011686 +- 0.000145 | 0.003368 +- 0.000097 | CopyIf on 2097152 values with 104858 valid values (vtkm::Vec< vtkm::Float64, 3 >) |
4.593 | 0.011087 +- 0.000158 | 0.002414 +- 0.000081 | CopyIf on 2097152 values with 104858 valid values (vtkm::Vec< vtkm::Int32, 2 >) | |
5.912 | 0.010295 +- 0.000170 | 0.001741 +- 0.000068 | CopyIf on 2097152 values with 104858 valid values (vtkm::Vec< vtkm::UInt8, 4 >) | |
5.311 | 0.010065 +- 0.000149 | 0.001895 +- 0.000072 | CopyIf on 2097152 values with 209716 valid values (vtkm::Float32) | |
3.648 | 0.010304 +- 0.000143 | 0.002824 +- 0.000084 | CopyIf on 2097152 values with 209716 valid values (vtkm::Float64) | |
5.312 | 0.010104 +- 0.000156 | 0.001902 +- 0.000083 | CopyIf on 2097152 values with 209716 valid values (vtkm::Int32) | |
3.632 | 0.010268 +- 0.000141 | 0.002827 +- 0.000096 | CopyIf on 2097152 values with 209716 valid values (vtkm::Int64) | |
5.292 | 0.010080 +- 0.000165 | 0.001905 +- 0.000078 | CopyIf on 2097152 values with 209716 valid values (vtkm::UInt32) | |
8.275 | 0.009749 +- 0.000167 | 0.001178 +- 0.000050 | CopyIf on 2097152 values with 209716 valid values (vtkm::UInt8) | |
2.669 | !! | 0.011818 +- 0.000135 | 0.004428 +- 0.000120 | CopyIf on 2097152 values with 209716 valid values (vtkm::Vec< vtkm::Float32, 4 >) |
2.194 | !! | 0.012657 +- 0.000145 | 0.005770 +- 0.000142 | CopyIf on 2097152 values with 209716 valid values (vtkm::Vec< vtkm::Float64, 3 >) |
3.681 | 0.010367 +- 0.000156 | 0.002816 +- 0.000084 | CopyIf on 2097152 values with 209716 valid values (vtkm::Vec< vtkm::Int32, 2 >) | |
5.051 | 0.009944 +- 0.000135 | 0.001969 +- 0.000068 | CopyIf on 2097152 values with 209716 valid values (vtkm::Vec< vtkm::UInt8, 4 >) | |
4.603 | 0.009852 +- 0.000156 | 0.002140 +- 0.000078 | CopyIf on 2097152 values with 349526 valid values (vtkm::Float32) | |
3.115 | ! | 0.010378 +- 0.000152 | 0.003332 +- 0.000090 | CopyIf on 2097152 values with 349526 valid values (vtkm::Float64) |
4.675 | 0.010001 +- 0.000334 | 0.002139 +- 0.000072 | CopyIf on 2097152 values with 349526 valid values (vtkm::Int32) | |
3.133 | ! | 0.010485 +- 0.000155 | 0.003347 +- 0.000089 | CopyIf on 2097152 values with 349526 valid values (vtkm::Int64) |
4.631 | 0.009904 +- 0.000164 | 0.002139 +- 0.000077 | CopyIf on 2097152 values with 349526 valid values (vtkm::UInt32) | |
7.914 | 0.009736 +- 0.000178 | 0.001230 +- 0.000059 | CopyIf on 2097152 values with 349526 valid values (vtkm::UInt8) | |
2.046 | !! | 0.011479 +- 0.000129 | 0.005612 +- 0.000152 | CopyIf on 2097152 values with 349526 valid values (vtkm::Vec< vtkm::Float32, 4 >) |
1.358 | !!! | 0.012989 +- 0.000173 | 0.009566 +- 0.000328 | CopyIf on 2097152 values with 349526 valid values (vtkm::Vec< vtkm::Float64, 3 >) |
3.183 | ! | 0.010593 +- 0.000151 | 0.003328 +- 0.000093 | CopyIf on 2097152 values with 349526 valid values (vtkm::Vec< vtkm::Int32, 2 >) |
4.335 | 0.009753 +- 0.000155 | 0.002250 +- 0.000078 | CopyIf on 2097152 values with 349526 valid values (vtkm::Vec< vtkm::UInt8, 4 >) | |
4.395 | 0.009937 +- 0.000155 | 0.002261 +- 0.000079 | CopyIf on 2097152 values with 419431 valid values (vtkm::Float32) | |
2.923 | !! | 0.010439 +- 0.000136 | 0.003571 +- 0.000108 | CopyIf on 2097152 values with 419431 valid values (vtkm::Float64) |
4.413 | 0.009988 +- 0.000159 | 0.002263 +- 0.000078 | CopyIf on 2097152 values with 419431 valid values (vtkm::Int32) | |
2.964 | !! | 0.010504 +- 0.000167 | 0.003544 +- 0.000111 | CopyIf on 2097152 values with 419431 valid values (vtkm::Int64) |
4.374 | 0.009899 +- 0.000154 | 0.002263 +- 0.000084 | CopyIf on 2097152 values with 419431 valid values (vtkm::UInt32) | |
7.639 | 0.009671 +- 0.000168 | 0.001266 +- 0.000055 | CopyIf on 2097152 values with 419431 valid values (vtkm::UInt8) | |
1.882 | !!! | 0.011593 +- 0.000150 | 0.006159 +- 0.000161 | CopyIf on 2097152 values with 419431 valid values (vtkm::Vec< vtkm::Float32, 4 >) |
1.486 | !!! | 0.012917 +- 0.000146 | 0.008694 +- 0.000250 | CopyIf on 2097152 values with 419431 valid values (vtkm::Vec< vtkm::Float64, 3 >) |
2.928 | !! | 0.010509 +- 0.000146 | 0.003589 +- 0.000116 | CopyIf on 2097152 values with 419431 valid values (vtkm::Vec< vtkm::Int32, 2 >) |
4.121 | 0.009825 +- 0.000148 | 0.002384 +- 0.000089 | CopyIf on 2097152 values with 419431 valid values (vtkm::Vec< vtkm::UInt8, 4 >) | |
4.014 | 0.009885 +- 0.000150 | 0.002463 +- 0.000089 | CopyIf on 2097152 values with 524288 valid values (vtkm::Float32) | |
2.641 | !! | 0.010493 +- 0.000155 | 0.003973 +- 0.000129 | CopyIf on 2097152 values with 524288 valid values (vtkm::Float64) |
4.050 | 0.009911 +- 0.000150 | 0.002447 +- 0.000085 | CopyIf on 2097152 values with 524288 valid values (vtkm::Int32) | |
2.760 | !! | 0.010918 +- 0.000149 | 0.003956 +- 0.000127 | CopyIf on 2097152 values with 524288 valid values (vtkm::Int64) |
4.053 | 0.009893 +- 0.000144 | 0.002441 +- 0.000076 | CopyIf on 2097152 values with 524288 valid values (vtkm::UInt32) | |
7.470 | 0.009735 +- 0.000159 | 0.001303 +- 0.000055 | CopyIf on 2097152 values with 524288 valid values (vtkm::UInt8) | |
1.751 | !!! | 0.012224 +- 0.000147 | 0.006982 +- 0.000193 | CopyIf on 2097152 values with 524288 valid values (vtkm::Vec< vtkm::Float32, 4 >) |
1.363 | !!! | 0.013541 +- 0.000149 | 0.009936 +- 0.000326 | CopyIf on 2097152 values with 524288 valid values (vtkm::Vec< vtkm::Float64, 3 >) |
2.740 | !! | 0.010818 +- 0.000148 | 0.003949 +- 0.000113 | CopyIf on 2097152 values with 524288 valid values (vtkm::Vec< vtkm::Int32, 2 >) |
3.879 | 0.010078 +- 0.000163 | 0.002598 +- 0.000101 | CopyIf on 2097152 values with 524288 valid values (vtkm::Vec< vtkm::UInt8, 4 >) | |
3.855 | 0.010408 +- 0.000283 | 0.002699 +- 0.000098 | CopyIf on 2097152 values with 699051 valid values (vtkm::Float32) | |
2.311 | !! | 0.010507 +- 0.000150 | 0.004546 +- 0.000130 | CopyIf on 2097152 values with 699051 valid values (vtkm::Float64) |
3.805 | 0.010242 +- 0.000149 | 0.002692 +- 0.000099 | CopyIf on 2097152 values with 699051 valid values (vtkm::Int32) | |
2.342 | !! | 0.010567 +- 0.000136 | 0.004513 +- 0.000133 | CopyIf on 2097152 values with 699051 valid values (vtkm::Int64) |
3.790 | 0.010218 +- 0.000149 | 0.002696 +- 0.000091 | CopyIf on 2097152 values with 699051 valid values (vtkm::UInt32) | |
6.938 | 0.009559 +- 0.000159 | 0.001378 +- 0.000070 | CopyIf on 2097152 values with 699051 valid values (vtkm::UInt8) | |
1.465 | !!! | 0.012131 +- 0.000154 | 0.008279 +- 0.000270 | CopyIf on 2097152 values with 699051 valid values (vtkm::Vec< vtkm::Float32, 4 >) |
0.928 | !!!! | 0.013915 +- 0.000166 | 0.014996 +- 0.000521 | CopyIf on 2097152 values with 699051 valid values (vtkm::Vec< vtkm::Float64, 3 >) |
2.310 | !! | 0.010633 +- 0.000145 | 0.004603 +- 0.000141 | CopyIf on 2097152 values with 699051 valid values (vtkm::Vec< vtkm::Int32, 2 >) |
3.561 | ! | 0.010265 +- 0.000148 | 0.002883 +- 0.000117 | CopyIf on 2097152 values with 699051 valid values (vtkm::Vec< vtkm::UInt8, 4 >) |
Scaling is poor against the new serial backend, but is likely due to threading overhead on a really simple algorithm. Both show a significant improvement over the general implementation.
New TBB vs. new serial:
Speedup | Warn | serial | parallel | Benchmark (Type) |
---|---|---|---|---|
2.066 | !! | 0.003438 +- 0.000103 | 0.001664 +- 0.000057 | CopyIf on 2097152 values with 104858 valid values (vtkm::Float32) |
1.866 | !!! | 0.004508 +- 0.000104 | 0.002416 +- 0.000077 | CopyIf on 2097152 values with 104858 valid values (vtkm::Float64) |
2.163 | !! | 0.003604 +- 0.000094 | 0.001666 +- 0.000055 | CopyIf on 2097152 values with 104858 valid values (vtkm::Int32) |
1.883 | !!! | 0.004551 +- 0.000101 | 0.002417 +- 0.000086 | CopyIf on 2097152 values with 104858 valid values (vtkm::Int64) |
2.073 | !! | 0.003454 +- 0.000115 | 0.001666 +- 0.000055 | CopyIf on 2097152 values with 104858 valid values (vtkm::UInt32) |
2.984 | !! | 0.003390 +- 0.000094 | 0.001136 +- 0.000052 | CopyIf on 2097152 values with 104858 valid values (vtkm::UInt8) |
1.211 | !!! | 0.003610 +- 0.000105 | 0.002982 +- 0.000093 | CopyIf on 2097152 values with 104858 valid values (vtkm::Vec< vtkm::Float32, 4 >) |
1.174 | !!! | 0.003972 +- 0.000115 | 0.003383 +- 0.000110 | CopyIf on 2097152 values with 104858 valid values (vtkm::Vec< vtkm::Float64, 3 >) |
1.516 | !!! | 0.003632 +- 0.000118 | 0.002395 +- 0.000069 | CopyIf on 2097152 values with 104858 valid values (vtkm::Vec< vtkm::Int32, 2 >) |
1.993 | !!! | 0.003457 +- 0.000076 | 0.001735 +- 0.000054 | CopyIf on 2097152 values with 104858 valid values (vtkm::Vec< vtkm::UInt8, 4 >) |
1.490 | !!! | 0.002838 +- 0.000084 | 0.001904 +- 0.000064 | CopyIf on 2097152 values with 209716 valid values (vtkm::Float32) |
1.279 | !!! | 0.003567 +- 0.000094 | 0.002789 +- 0.000078 | CopyIf on 2097152 values with 209716 valid values (vtkm::Float64) |
1.494 | !!! | 0.002833 +- 0.000080 | 0.001897 +- 0.000070 | CopyIf on 2097152 values with 209716 valid values (vtkm::Int32) |
1.237 | !!! | 0.003555 +- 0.000086 | 0.002873 +- 0.000084 | CopyIf on 2097152 values with 209716 valid values (vtkm::Int64) |
1.488 | !!! | 0.002821 +- 0.000072 | 0.001896 +- 0.000071 | CopyIf on 2097152 values with 209716 valid values (vtkm::UInt32) |
2.322 | !! | 0.002722 +- 0.000075 | 0.001173 +- 0.000056 | CopyIf on 2097152 values with 209716 valid values (vtkm::UInt8) |
0.981 | !!!! | 0.004340 +- 0.000100 | 0.004423 +- 0.000119 | CopyIf on 2097152 values with 209716 valid values (vtkm::Vec< vtkm::Float32, 4 >) |
0.844 | !!!! | 0.004883 +- 0.000096 | 0.005786 +- 0.000160 | CopyIf on 2097152 values with 209716 valid values (vtkm::Vec< vtkm::Float64, 3 >) |
1.068 | !!! | 0.003020 +- 0.000065 | 0.002829 +- 0.000087 | CopyIf on 2097152 values with 209716 valid values (vtkm::Vec< vtkm::Int32, 2 >) |
1.463 | !!! | 0.002869 +- 0.000077 | 0.001962 +- 0.000058 | CopyIf on 2097152 values with 209716 valid values (vtkm::Vec< vtkm::UInt8, 4 >) |
1.304 | !!! | 0.002806 +- 0.000086 | 0.002153 +- 0.000085 | CopyIf on 2097152 values with 349526 valid values (vtkm::Float32) |
1.035 | !!! | 0.003495 +- 0.000088 | 0.003376 +- 0.000091 | CopyIf on 2097152 values with 349526 valid values (vtkm::Float64) |
1.306 | !!! | 0.002796 +- 0.000080 | 0.002141 +- 0.000065 | CopyIf on 2097152 values with 349526 valid values (vtkm::Int32) |
1.037 | !!! | 0.003478 +- 0.000078 | 0.003354 +- 0.000093 | CopyIf on 2097152 values with 349526 valid values (vtkm::Int64) |
1.303 | !!! | 0.002800 +- 0.000090 | 0.002149 +- 0.000074 | CopyIf on 2097152 values with 349526 valid values (vtkm::UInt32) |
2.182 | !! | 0.002690 +- 0.000079 | 0.001233 +- 0.000048 | CopyIf on 2097152 values with 349526 valid values (vtkm::UInt8) |
0.685 | !!!! | 0.003849 +- 0.000076 | 0.005618 +- 0.000154 | CopyIf on 2097152 values with 349526 valid values (vtkm::Vec< vtkm::Float32, 4 >) |
0.521 | !!!! | 0.005021 +- 0.000099 | 0.009634 +- 0.000339 | CopyIf on 2097152 values with 349526 valid values (vtkm::Vec< vtkm::Float64, 3 >) |
0.903 | !!!! | 0.002992 +- 0.000089 | 0.003312 +- 0.000096 | CopyIf on 2097152 values with 349526 valid values (vtkm::Vec< vtkm::Int32, 2 >) |
1.274 | !!! | 0.002878 +- 0.000078 | 0.002260 +- 0.000085 | CopyIf on 2097152 values with 349526 valid values (vtkm::Vec< vtkm::UInt8, 4 >) |
1.232 | !!! | 0.002789 +- 0.000082 | 0.002264 +- 0.000077 | CopyIf on 2097152 values with 419431 valid values (vtkm::Float32) |
0.952 | !!!! | 0.003390 +- 0.000086 | 0.003562 +- 0.000102 | CopyIf on 2097152 values with 419431 valid values (vtkm::Float64) |
1.240 | !!! | 0.002797 +- 0.000076 | 0.002255 +- 0.000069 | CopyIf on 2097152 values with 419431 valid values (vtkm::Int32) |
0.960 | !!!! | 0.003395 +- 0.000091 | 0.003536 +- 0.000105 | CopyIf on 2097152 values with 419431 valid values (vtkm::Int64) |
1.227 | !!! | 0.002781 +- 0.000067 | 0.002267 +- 0.000072 | CopyIf on 2097152 values with 419431 valid values (vtkm::UInt32) |
2.112 | !! | 0.002661 +- 0.000070 | 0.001260 +- 0.000048 | CopyIf on 2097152 values with 419431 valid values (vtkm::UInt8) |
0.630 | !!!! | 0.003881 +- 0.000084 | 0.006155 +- 0.000157 | CopyIf on 2097152 values with 419431 valid values (vtkm::Vec< vtkm::Float32, 4 >) |
0.590 | !!!! | 0.005141 +- 0.000095 | 0.008710 +- 0.000239 | CopyIf on 2097152 values with 419431 valid values (vtkm::Vec< vtkm::Float64, 3 >) |
0.884 | !!!! | 0.003124 +- 0.000072 | 0.003533 +- 0.000106 | CopyIf on 2097152 values with 419431 valid values (vtkm::Vec< vtkm::Int32, 2 >) |
1.211 | !!! | 0.002889 +- 0.000076 | 0.002386 +- 0.000083 | CopyIf on 2097152 values with 419431 valid values (vtkm::Vec< vtkm::UInt8, 4 >) |
0.850 | !!!! | 0.002072 +- 0.000076 | 0.002439 +- 0.000087 | CopyIf on 2097152 values with 524288 valid values (vtkm::Float32) |
0.863 | !!!! | 0.003422 +- 0.000095 | 0.003965 +- 0.000118 | CopyIf on 2097152 values with 524288 valid values (vtkm::Float64) |
0.843 | !!!! | 0.002066 +- 0.000063 | 0.002452 +- 0.000078 | CopyIf on 2097152 values with 524288 valid values (vtkm::Int32) |
0.866 | !!!! | 0.003410 +- 0.000091 | 0.003938 +- 0.000121 | CopyIf on 2097152 values with 524288 valid values (vtkm::Int64) |
0.843 | !!!! | 0.002061 +- 0.000046 | 0.002444 +- 0.000083 | CopyIf on 2097152 values with 524288 valid values (vtkm::UInt32) |
1.394 | !!! | 0.001821 +- 0.000051 | 0.001306 +- 0.000057 | CopyIf on 2097152 values with 524288 valid values (vtkm::UInt8) |
0.579 | !!!! | 0.004023 +- 0.000090 | 0.006953 +- 0.000203 | CopyIf on 2097152 values with 524288 valid values (vtkm::Vec< vtkm::Float32, 4 >) |
0.546 | !!!! | 0.005402 +- 0.000097 | 0.009891 +- 0.000304 | CopyIf on 2097152 values with 524288 valid values (vtkm::Vec< vtkm::Float64, 3 >) |
0.729 | !!!! | 0.002895 +- 0.000064 | 0.003972 +- 0.000125 | CopyIf on 2097152 values with 524288 valid values (vtkm::Vec< vtkm::Int32, 2 >) |
1.119 | !!! | 0.002905 +- 0.000080 | 0.002597 +- 0.000112 | CopyIf on 2097152 values with 524288 valid values (vtkm::Vec< vtkm::UInt8, 4 >) |
0.776 | !!!! | 0.002088 +- 0.000051 | 0.002690 +- 0.000097 | CopyIf on 2097152 values with 699051 valid values (vtkm::Float32) |
0.648 | !!!! | 0.002916 +- 0.000069 | 0.004501 +- 0.000136 | CopyIf on 2097152 values with 699051 valid values (vtkm::Float64) |
0.789 | !!!! | 0.002110 +- 0.000072 | 0.002676 +- 0.000097 | CopyIf on 2097152 values with 699051 valid values (vtkm::Int32) |
0.645 | !!!! | 0.002936 +- 0.000061 | 0.004548 +- 0.000146 | CopyIf on 2097152 values with 699051 valid values (vtkm::Int64) |
0.784 | !!!! | 0.002110 +- 0.000066 | 0.002691 +- 0.000090 | CopyIf on 2097152 values with 699051 valid values (vtkm::UInt32) |
1.331 | !!! | 0.001817 +- 0.000054 | 0.001365 +- 0.000061 | CopyIf on 2097152 values with 699051 valid values (vtkm::UInt8) |
0.524 | !!!! | 0.004330 +- 0.000100 | 0.008265 +- 0.000265 | CopyIf on 2097152 values with 699051 valid values (vtkm::Vec< vtkm::Float32, 4 >) |
0.387 | !!!! | 0.005940 +- 0.000099 | 0.015359 +- 0.000715 | CopyIf on 2097152 values with 699051 valid values (vtkm::Vec< vtkm::Float64, 3 >) |
0.670 | !!!! | 0.003053 +- 0.000062 | 0.004556 +- 0.000131 | CopyIf on 2097152 values with 699051 valid values (vtkm::Vec< vtkm::Int32, 2 >) |
0.760 | !!!! | 0.002201 +- 0.000065 | 0.002895 +- 0.000112 | CopyIf on 2097152 values with 699051 valid values (vtkm::Vec< vtkm::UInt8, 4 >) |
Edited by Allison Vacanti