146 auto& mview = product.
view();
147 auto const& cmview = product.
view();
151 <<
view.metadata().size();
157 msg <<
" data @ " << product.
buffer().data() <<
",\n" 158 <<
" x @ " <<
view.metadata().addressOf_x() <<
" = " << Column(
view.x(),
view.metadata().size()) <<
",\n" 159 <<
" y @ " <<
view.metadata().addressOf_y() <<
" = " << Column(
view.y(),
view.metadata().size()) <<
",\n" 160 <<
" z @ " <<
view.metadata().addressOf_z() <<
" = " << Column(
view.z(),
view.metadata().size()) <<
",\n" 161 <<
" id @ " <<
view.metadata().addressOf_id() <<
" = " << Column(
view.id(),
view.metadata().size())
163 <<
" r @ " <<
view.metadata().addressOf_r() <<
" = " <<
view.r() <<
'\n' 164 <<
" flags @ " <<
view.metadata().addressOf_flags() <<
" = " << Column(
view.flags(),
view.metadata().size())
168 msg << std::hex <<
" [y - x] = 0x" 169 <<
reinterpret_cast<intptr_t
>(
view.metadata().addressOf_y()) -
170 reinterpret_cast<intptr_t>(
view.metadata().addressOf_x())
172 << reinterpret_cast<intptr_t>(
view.metadata().addressOf_z()) -
173 reinterpret_cast<intptr_t>(
view.metadata().addressOf_y())
175 << reinterpret_cast<intptr_t>(
view.metadata().addressOf_id()) -
176 reinterpret_cast<intptr_t>(
view.metadata().addressOf_z())
178 << reinterpret_cast<intptr_t>(
view.metadata().addressOf_r()) -
179 reinterpret_cast<intptr_t>(
view.metadata().addressOf_id())
180 <<
" [flags - r] = 0x" 181 << reinterpret_cast<intptr_t>(
view.metadata().addressOf_flags()) -
182 reinterpret_cast<intptr_t>(
view.metadata().addressOf_r())
183 <<
" [m - flags] = 0x" 184 << reinterpret_cast<intptr_t>(
view.metadata().addressOf_m()) -
185 reinterpret_cast<intptr_t>(
view.metadata().addressOf_flags());
188 checkViewAddresses(
view);
189 checkViewAddresses(mview);
190 checkViewAddresses(cmview);
192 const portabletest::Matrix matrix{{1, 2, 3, 4, 5, 6}, {2, 4, 6, 8, 10, 12}, {3, 6, 9, 12, 15, 18}};
195 for (int32_t
i = 0;
i <
view.metadata().size(); ++
i) {
225 auto const& viewMulti2_0 = productMulti2.
const_view<0>();
226 auto& mviewMulti2_0 = productMulti2.
view<0>();
227 auto const& cmviewMulti2_0 = productMulti2.
view<0>();
228 auto const& viewMulti2_1 = productMulti2.
const_view<1>();
229 auto& mviewMulti2_1 = productMulti2.
view<1>();
230 auto const& cmviewMulti2_1 = productMulti2.
view<1>();
232 checkViewAddresses(viewMulti2_0);
233 checkViewAddresses(mviewMulti2_0);
234 checkViewAddresses(cmviewMulti2_0);
235 checkViewAddresses2(viewMulti2_1);
236 checkViewAddresses2(mviewMulti2_1);
237 checkViewAddresses2(cmviewMulti2_1);
239 assert(viewMulti2_0.r() == 1.);
240 for (int32_t
i = 0;
i < viewMulti2_0.metadata().size(); ++
i) {
241 auto vi = viewMulti2_0[
i];
255 assert(viewMulti2_1.r2() == 2.);
256 for (int32_t
i = 0;
i < viewMulti2_1.metadata().size(); ++
i) {
257 auto vi = viewMulti2_1[
i];
269 auto const& viewMulti3_0 = productMulti3.
const_view<0>();
270 auto& mviewMulti3_0 = productMulti3.
view<0>();
271 auto const& cmviewMulti3_0 = productMulti3.
view<0>();
272 auto const& viewMulti3_1 = productMulti3.
const_view<1>();
273 auto& mviewMulti3_1 = productMulti3.
view<1>();
274 auto const& cmviewMulti3_1 = productMulti3.
view<1>();
275 auto const& viewMulti3_2 = productMulti3.
const_view<2>();
276 auto& mviewMulti3_2 = productMulti3.
view<2>();
277 auto const& cmviewMulti3_2 = productMulti3.
view<2>();
279 checkViewAddresses(viewMulti3_0);
280 checkViewAddresses(mviewMulti3_0);
281 checkViewAddresses(cmviewMulti3_0);
282 checkViewAddresses2(viewMulti3_1);
283 checkViewAddresses2(mviewMulti3_1);
284 checkViewAddresses2(cmviewMulti3_1);
285 checkViewAddresses3(viewMulti3_2);
286 checkViewAddresses3(mviewMulti3_2);
287 checkViewAddresses3(cmviewMulti3_2);
289 assert(viewMulti3_0.r() == 1.);
290 for (int32_t
i = 0;
i < viewMulti3_0.metadata().size(); ++
i) {
291 auto vi = viewMulti3_0[
i];
301 assert(viewMulti3_1.r2() == 2.);
302 for (int32_t
i = 0;
i < viewMulti3_1.metadata().size(); ++
i) {
303 auto vi = viewMulti3_1[
i];
314 assert(viewMulti3_2.r3() == 3.);
315 for (int32_t
i = 0;
i < viewMulti3_2.metadata().size(); ++
i) {
316 auto vi = viewMulti3_2[
i];
const edm::EDGetTokenT< portabletest::TestHostCollection > token_
Eigen::Matrix< double, 3, 6 > Matrix
std::optional< cms::alpakatools::Backend > expectBackend_
ConstView const & const_view() const
const edm::InputTag source_
const edm::EDGetTokenT< portabletest::TestHostMultiCollection2 > tokenMulti2_
edm::EDGetTokenT< unsigned short > backendToken_
const std::vector< double > expectXvalues_
const edm::EDGetTokenT< portabletest::TestHostMultiCollection3 > tokenMulti3_
ConstView< Idx > const & const_view() const