Viskores  1.0
WorkletInvokeFunctorDetail.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 // **** DO NOT EDIT THIS FILE!!! ****
19 // This file is automatically generated by WorkletInvokeFunctorDetail.h.in
20 
21 // Technically speaking, we can implement this functionality with some clever
22 // use of FunctionInterface rather than using pyexpander to make variadic
23 // code. However, this code is probably more friendly to compilers. I expect
24 // it to compiler faster and optimize better.
25 
26 #ifndef viskores_exec_internal_WorkletInvokeFunctorDetail_h
27 #define viskores_exec_internal_WorkletInvokeFunctorDetail_h
28 
29 #if !defined(viskores_exec_internal_TaskSingular_h) && \
30  !defined(viskores_exec_internal_TaskTiling_h) && \
31  !defined(viskores_exec_cuda_internal_TaskStrided_h) && \
32  !defined(VISKORES_TEST_HEADER_BUILD)
33 #error WorkletInvokeFunctorDetail.h must be included from TaskSingular.h, TaskTiling.h, TaskStrided.h
34 #endif
35 
38 
41 
42 #if VISKORES_MAX_FUNCTION_PARAMETERS != 20
43 #error Mismatch of maximum parameters between FunctionInterfaceDatailPre.h.in and WorkletInvokeFunctorDetail.h.in
44 #endif
45 
46 
47 namespace viskores
48 {
49 namespace exec
50 {
51 namespace internal
52 {
53 namespace detail
54 {
55 
56 struct DummyDeviceControlSignatureTag
57 {
59 };
60 
64 template <typename ThreadIndicesType,
65  typename Invocation,
66  viskores::IdComponent ExecutionParameterIndex>
67 struct InvocationToFetch
68 {
69  using ExecutionSignatureTag =
70  typename Invocation::ExecutionInterface::template ParameterType<ExecutionParameterIndex>::type;
71 
72  // Expected fields from ExecutionSignatureTag. If these do not exist in
73  // ExecutionSignatureTag, then something that is not really an execution
74  // signature tag was used in an ExecutionSignature.
75  static constexpr viskores::IdComponent ControlParameterIndex = ExecutionSignatureTag::INDEX;
76  using AspectTag = typename ExecutionSignatureTag::AspectTag;
77 
78  // Find the fetch tag from the control signature tag pointed to by
79  // ParameterIndex. Note that ControlParameterIndex of 0 is reserved
80  // for getting the device adapter tag.
81  using ControlInterface = typename Invocation::ControlInterface;
82  using ControlSignatureTag =
83  typename std::conditional<
84  ControlParameterIndex == 0,
85  DummyDeviceControlSignatureTag,
86  typename ControlInterface::template ParameterType<ControlParameterIndex>::type>::type;
87  using FetchTag = typename ControlSignatureTag::FetchTag;
88 
89  using ExecObjectType =
90  typename std::conditional<
91  ControlParameterIndex == 0,
92  typename Invocation::DeviceAdapterTag,
93  typename Invocation::ParameterInterface::template ParameterType<ControlParameterIndex>::type>::type;
94 
96 
97  VISKORES_EXEC static ExecObjectType GetParameterImpl(const Invocation&, std::true_type)
98  {
99  return typename Invocation::DeviceAdapterTag();
100  }
101 
102  VISKORES_EXEC static ExecObjectType GetParameterImpl(const Invocation& invocation, std::false_type)
103  {
104  return viskores::internal::ParameterGet<ControlParameterIndex>(invocation.Parameters);
105  }
106 
107  VISKORES_EXEC static ExecObjectType GetParameter(const Invocation& invocation)
108  {
109  return GetParameterImpl(invocation, std::integral_constant<bool, ControlParameterIndex == 0>());
110  }
111 };
112 
113 // clang-format off
114 
115 template <typename WorkletType,
116  typename ParameterInterface,
117  typename ControlInterface,
118  viskores::IdComponent InputDomainIndex,
119  typename OutputToInputMapType,
120  typename VisitArrayType,
121  typename ThreadToOutputMapType,
122  typename DeviceAdapterTag,
123  typename ThreadIndicesType,
124  typename R,
125  typename P1>
126 VISKORES_EXEC void DoWorkletInvokeFunctor(
127  const WorkletType& worklet,
128  const viskores::internal::Invocation<ParameterInterface,
129  ControlInterface,
130  viskores::internal::FunctionInterface<R(P1)>,
131  InputDomainIndex,
132  OutputToInputMapType,
133  VisitArrayType,
134  ThreadToOutputMapType,
135  DeviceAdapterTag>& invocation,
136  const ThreadIndicesType& threadIndices)
137 {
138  using Invocation = viskores::internal::Invocation<ParameterInterface,
139  ControlInterface,
140  viskores::internal::FunctionInterface<R(P1)>,
141  InputDomainIndex,
142  OutputToInputMapType,
143  VisitArrayType,
144  ThreadToOutputMapType,
145  DeviceAdapterTag>;
146 
147  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
148  using FetchType1 = typename FetchInfo1::type;
149  FetchType1 fetch1;
150  auto p1 =
151  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
152 
153  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
154  using ReturnFetchType = typename FetchInfo0::type;
155  ReturnFetchType returnFetch;
156  // If you got a compile error on the following line, it probably means that
157  // the operator() of a worklet does not match the definition expected. One
158  // common problem is that the operator() method must be declared const. Check
159  // to make sure the "const" keyword is after parameters. Another common
160  // problem is that the type of one or more parameters is incompatible with
161  // the actual type that Viskores creates in the execution environment. Make sure
162  // that the types of the worklet operator() parameters match those in the
163  // ExecutionSignature. The compiler error might help you narrow down which
164  // parameter is wrong and the types that did not match.
165  auto r = worklet(p1);
166 
167  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
168 
169  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
170 }
171 
172 template <typename WorkletType,
173  typename ParameterInterface,
174  typename ControlInterface,
175  viskores::IdComponent InputDomainIndex,
176  typename OutputToInputMapType,
177  typename VisitArrayType,
178  typename ThreadToOutputMapType,
179  typename DeviceAdapterTag,
180  typename ThreadIndicesType,
181  typename P1>
182 VISKORES_EXEC void DoWorkletInvokeFunctor(
183  const WorkletType& worklet,
184  const viskores::internal::Invocation<ParameterInterface,
185  ControlInterface,
186  viskores::internal::FunctionInterface<void(P1)>,
187  InputDomainIndex,
188  OutputToInputMapType,
189  VisitArrayType,
190  ThreadToOutputMapType,
191  DeviceAdapterTag>& invocation,
192  const ThreadIndicesType& threadIndices)
193 {
194  using Invocation =
195  viskores::internal::Invocation<ParameterInterface,
196  ControlInterface,
197  viskores::internal::FunctionInterface<void(P1)>,
198  InputDomainIndex,
199  OutputToInputMapType,
200  VisitArrayType,
201  ThreadToOutputMapType,
202  DeviceAdapterTag>;
203 
204  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
205  using FetchType1 = typename FetchInfo1::type;
206  FetchType1 fetch1;
207  auto p1 =
208  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
209 
210  // If you got a compile error on the following line, it probably means that
211  // the operator() of a worklet does not match the definition expected. One
212  // common problem is that the operator() method must be declared const. Check
213  // to make sure the "const" keyword is after parameters. Another common
214  // problem is that the type of one or more parameters is incompatible with
215  // the actual type that Viskores creates in the execution environment. Make sure
216  // that the types of the worklet operator() parameters match those in the
217  // ExecutionSignature. The compiler error might help you narrow down which
218  // parameter is wrong and the types that did not match.
219  worklet(p1);
220 
221  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
222 }
223 
224 template <typename WorkletType,
225  typename ParameterInterface,
226  typename ControlInterface,
227  viskores::IdComponent InputDomainIndex,
228  typename OutputToInputMapType,
229  typename VisitArrayType,
230  typename ThreadToOutputMapType,
231  typename DeviceAdapterTag,
232  typename ThreadIndicesType,
233  typename R,
234  typename P1,
235  typename P2>
236 VISKORES_EXEC void DoWorkletInvokeFunctor(
237  const WorkletType& worklet,
238  const viskores::internal::Invocation<ParameterInterface,
239  ControlInterface,
240  viskores::internal::FunctionInterface<R(P1, P2)>,
241  InputDomainIndex,
242  OutputToInputMapType,
243  VisitArrayType,
244  ThreadToOutputMapType,
245  DeviceAdapterTag>& invocation,
246  const ThreadIndicesType& threadIndices)
247 {
248  using Invocation = viskores::internal::Invocation<ParameterInterface,
249  ControlInterface,
250  viskores::internal::FunctionInterface<R(P1, P2)>,
251  InputDomainIndex,
252  OutputToInputMapType,
253  VisitArrayType,
254  ThreadToOutputMapType,
255  DeviceAdapterTag>;
256 
257  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
258  using FetchType1 = typename FetchInfo1::type;
259  FetchType1 fetch1;
260  auto p1 =
261  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
262 
263  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
264  using FetchType2 = typename FetchInfo2::type;
265  FetchType2 fetch2;
266  auto p2 =
267  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
268 
269  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
270  using ReturnFetchType = typename FetchInfo0::type;
271  ReturnFetchType returnFetch;
272  // If you got a compile error on the following line, it probably means that
273  // the operator() of a worklet does not match the definition expected. One
274  // common problem is that the operator() method must be declared const. Check
275  // to make sure the "const" keyword is after parameters. Another common
276  // problem is that the type of one or more parameters is incompatible with
277  // the actual type that Viskores creates in the execution environment. Make sure
278  // that the types of the worklet operator() parameters match those in the
279  // ExecutionSignature. The compiler error might help you narrow down which
280  // parameter is wrong and the types that did not match.
281  auto r = worklet(p1, p2);
282 
283  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
284  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
285 
286  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
287 }
288 
289 template <typename WorkletType,
290  typename ParameterInterface,
291  typename ControlInterface,
292  viskores::IdComponent InputDomainIndex,
293  typename OutputToInputMapType,
294  typename VisitArrayType,
295  typename ThreadToOutputMapType,
296  typename DeviceAdapterTag,
297  typename ThreadIndicesType,
298  typename P1,
299  typename P2>
300 VISKORES_EXEC void DoWorkletInvokeFunctor(
301  const WorkletType& worklet,
302  const viskores::internal::Invocation<ParameterInterface,
303  ControlInterface,
304  viskores::internal::FunctionInterface<void(P1, P2)>,
305  InputDomainIndex,
306  OutputToInputMapType,
307  VisitArrayType,
308  ThreadToOutputMapType,
309  DeviceAdapterTag>& invocation,
310  const ThreadIndicesType& threadIndices)
311 {
312  using Invocation =
313  viskores::internal::Invocation<ParameterInterface,
314  ControlInterface,
315  viskores::internal::FunctionInterface<void(P1, P2)>,
316  InputDomainIndex,
317  OutputToInputMapType,
318  VisitArrayType,
319  ThreadToOutputMapType,
320  DeviceAdapterTag>;
321 
322  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
323  using FetchType1 = typename FetchInfo1::type;
324  FetchType1 fetch1;
325  auto p1 =
326  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
327 
328  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
329  using FetchType2 = typename FetchInfo2::type;
330  FetchType2 fetch2;
331  auto p2 =
332  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
333 
334  // If you got a compile error on the following line, it probably means that
335  // the operator() of a worklet does not match the definition expected. One
336  // common problem is that the operator() method must be declared const. Check
337  // to make sure the "const" keyword is after parameters. Another common
338  // problem is that the type of one or more parameters is incompatible with
339  // the actual type that Viskores creates in the execution environment. Make sure
340  // that the types of the worklet operator() parameters match those in the
341  // ExecutionSignature. The compiler error might help you narrow down which
342  // parameter is wrong and the types that did not match.
343  worklet(p1, p2);
344 
345  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
346  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
347 }
348 
349 template <typename WorkletType,
350  typename ParameterInterface,
351  typename ControlInterface,
352  viskores::IdComponent InputDomainIndex,
353  typename OutputToInputMapType,
354  typename VisitArrayType,
355  typename ThreadToOutputMapType,
356  typename DeviceAdapterTag,
357  typename ThreadIndicesType,
358  typename R,
359  typename P1,
360  typename P2,
361  typename P3>
362 VISKORES_EXEC void DoWorkletInvokeFunctor(
363  const WorkletType& worklet,
364  const viskores::internal::Invocation<ParameterInterface,
365  ControlInterface,
366  viskores::internal::FunctionInterface<R(P1, P2, P3)>,
367  InputDomainIndex,
368  OutputToInputMapType,
369  VisitArrayType,
370  ThreadToOutputMapType,
371  DeviceAdapterTag>& invocation,
372  const ThreadIndicesType& threadIndices)
373 {
374  using Invocation = viskores::internal::Invocation<ParameterInterface,
375  ControlInterface,
376  viskores::internal::FunctionInterface<R(P1, P2, P3)>,
377  InputDomainIndex,
378  OutputToInputMapType,
379  VisitArrayType,
380  ThreadToOutputMapType,
381  DeviceAdapterTag>;
382 
383  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
384  using FetchType1 = typename FetchInfo1::type;
385  FetchType1 fetch1;
386  auto p1 =
387  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
388 
389  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
390  using FetchType2 = typename FetchInfo2::type;
391  FetchType2 fetch2;
392  auto p2 =
393  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
394 
395  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
396  using FetchType3 = typename FetchInfo3::type;
397  FetchType3 fetch3;
398  auto p3 =
399  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
400 
401  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
402  using ReturnFetchType = typename FetchInfo0::type;
403  ReturnFetchType returnFetch;
404  // If you got a compile error on the following line, it probably means that
405  // the operator() of a worklet does not match the definition expected. One
406  // common problem is that the operator() method must be declared const. Check
407  // to make sure the "const" keyword is after parameters. Another common
408  // problem is that the type of one or more parameters is incompatible with
409  // the actual type that Viskores creates in the execution environment. Make sure
410  // that the types of the worklet operator() parameters match those in the
411  // ExecutionSignature. The compiler error might help you narrow down which
412  // parameter is wrong and the types that did not match.
413  auto r = worklet(p1, p2, p3);
414 
415  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
416  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
417  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
418 
419  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
420 }
421 
422 template <typename WorkletType,
423  typename ParameterInterface,
424  typename ControlInterface,
425  viskores::IdComponent InputDomainIndex,
426  typename OutputToInputMapType,
427  typename VisitArrayType,
428  typename ThreadToOutputMapType,
429  typename DeviceAdapterTag,
430  typename ThreadIndicesType,
431  typename P1,
432  typename P2,
433  typename P3>
434 VISKORES_EXEC void DoWorkletInvokeFunctor(
435  const WorkletType& worklet,
436  const viskores::internal::Invocation<ParameterInterface,
437  ControlInterface,
438  viskores::internal::FunctionInterface<void(P1, P2, P3)>,
439  InputDomainIndex,
440  OutputToInputMapType,
441  VisitArrayType,
442  ThreadToOutputMapType,
443  DeviceAdapterTag>& invocation,
444  const ThreadIndicesType& threadIndices)
445 {
446  using Invocation =
447  viskores::internal::Invocation<ParameterInterface,
448  ControlInterface,
449  viskores::internal::FunctionInterface<void(P1, P2, P3)>,
450  InputDomainIndex,
451  OutputToInputMapType,
452  VisitArrayType,
453  ThreadToOutputMapType,
454  DeviceAdapterTag>;
455 
456  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
457  using FetchType1 = typename FetchInfo1::type;
458  FetchType1 fetch1;
459  auto p1 =
460  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
461 
462  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
463  using FetchType2 = typename FetchInfo2::type;
464  FetchType2 fetch2;
465  auto p2 =
466  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
467 
468  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
469  using FetchType3 = typename FetchInfo3::type;
470  FetchType3 fetch3;
471  auto p3 =
472  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
473 
474  // If you got a compile error on the following line, it probably means that
475  // the operator() of a worklet does not match the definition expected. One
476  // common problem is that the operator() method must be declared const. Check
477  // to make sure the "const" keyword is after parameters. Another common
478  // problem is that the type of one or more parameters is incompatible with
479  // the actual type that Viskores creates in the execution environment. Make sure
480  // that the types of the worklet operator() parameters match those in the
481  // ExecutionSignature. The compiler error might help you narrow down which
482  // parameter is wrong and the types that did not match.
483  worklet(p1, p2, p3);
484 
485  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
486  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
487  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
488 }
489 
490 template <typename WorkletType,
491  typename ParameterInterface,
492  typename ControlInterface,
493  viskores::IdComponent InputDomainIndex,
494  typename OutputToInputMapType,
495  typename VisitArrayType,
496  typename ThreadToOutputMapType,
497  typename DeviceAdapterTag,
498  typename ThreadIndicesType,
499  typename R,
500  typename P1,
501  typename P2,
502  typename P3,
503  typename P4>
504 VISKORES_EXEC void DoWorkletInvokeFunctor(
505  const WorkletType& worklet,
506  const viskores::internal::Invocation<ParameterInterface,
507  ControlInterface,
508  viskores::internal::FunctionInterface<R(P1, P2, P3, P4)>,
509  InputDomainIndex,
510  OutputToInputMapType,
511  VisitArrayType,
512  ThreadToOutputMapType,
513  DeviceAdapterTag>& invocation,
514  const ThreadIndicesType& threadIndices)
515 {
516  using Invocation = viskores::internal::Invocation<ParameterInterface,
517  ControlInterface,
518  viskores::internal::FunctionInterface<R(P1, P2, P3, P4)>,
519  InputDomainIndex,
520  OutputToInputMapType,
521  VisitArrayType,
522  ThreadToOutputMapType,
523  DeviceAdapterTag>;
524 
525  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
526  using FetchType1 = typename FetchInfo1::type;
527  FetchType1 fetch1;
528  auto p1 =
529  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
530 
531  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
532  using FetchType2 = typename FetchInfo2::type;
533  FetchType2 fetch2;
534  auto p2 =
535  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
536 
537  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
538  using FetchType3 = typename FetchInfo3::type;
539  FetchType3 fetch3;
540  auto p3 =
541  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
542 
543  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
544  using FetchType4 = typename FetchInfo4::type;
545  FetchType4 fetch4;
546  auto p4 =
547  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
548 
549  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
550  using ReturnFetchType = typename FetchInfo0::type;
551  ReturnFetchType returnFetch;
552  // If you got a compile error on the following line, it probably means that
553  // the operator() of a worklet does not match the definition expected. One
554  // common problem is that the operator() method must be declared const. Check
555  // to make sure the "const" keyword is after parameters. Another common
556  // problem is that the type of one or more parameters is incompatible with
557  // the actual type that Viskores creates in the execution environment. Make sure
558  // that the types of the worklet operator() parameters match those in the
559  // ExecutionSignature. The compiler error might help you narrow down which
560  // parameter is wrong and the types that did not match.
561  auto r = worklet(p1, p2, p3, p4);
562 
563  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
564  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
565  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
566  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
567 
568  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
569 }
570 
571 template <typename WorkletType,
572  typename ParameterInterface,
573  typename ControlInterface,
574  viskores::IdComponent InputDomainIndex,
575  typename OutputToInputMapType,
576  typename VisitArrayType,
577  typename ThreadToOutputMapType,
578  typename DeviceAdapterTag,
579  typename ThreadIndicesType,
580  typename P1,
581  typename P2,
582  typename P3,
583  typename P4>
584 VISKORES_EXEC void DoWorkletInvokeFunctor(
585  const WorkletType& worklet,
586  const viskores::internal::Invocation<ParameterInterface,
587  ControlInterface,
588  viskores::internal::FunctionInterface<void(P1, P2, P3, P4)>,
589  InputDomainIndex,
590  OutputToInputMapType,
591  VisitArrayType,
592  ThreadToOutputMapType,
593  DeviceAdapterTag>& invocation,
594  const ThreadIndicesType& threadIndices)
595 {
596  using Invocation =
597  viskores::internal::Invocation<ParameterInterface,
598  ControlInterface,
599  viskores::internal::FunctionInterface<void(P1, P2, P3, P4)>,
600  InputDomainIndex,
601  OutputToInputMapType,
602  VisitArrayType,
603  ThreadToOutputMapType,
604  DeviceAdapterTag>;
605 
606  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
607  using FetchType1 = typename FetchInfo1::type;
608  FetchType1 fetch1;
609  auto p1 =
610  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
611 
612  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
613  using FetchType2 = typename FetchInfo2::type;
614  FetchType2 fetch2;
615  auto p2 =
616  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
617 
618  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
619  using FetchType3 = typename FetchInfo3::type;
620  FetchType3 fetch3;
621  auto p3 =
622  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
623 
624  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
625  using FetchType4 = typename FetchInfo4::type;
626  FetchType4 fetch4;
627  auto p4 =
628  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
629 
630  // If you got a compile error on the following line, it probably means that
631  // the operator() of a worklet does not match the definition expected. One
632  // common problem is that the operator() method must be declared const. Check
633  // to make sure the "const" keyword is after parameters. Another common
634  // problem is that the type of one or more parameters is incompatible with
635  // the actual type that Viskores creates in the execution environment. Make sure
636  // that the types of the worklet operator() parameters match those in the
637  // ExecutionSignature. The compiler error might help you narrow down which
638  // parameter is wrong and the types that did not match.
639  worklet(p1, p2, p3, p4);
640 
641  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
642  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
643  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
644  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
645 }
646 
647 template <typename WorkletType,
648  typename ParameterInterface,
649  typename ControlInterface,
650  viskores::IdComponent InputDomainIndex,
651  typename OutputToInputMapType,
652  typename VisitArrayType,
653  typename ThreadToOutputMapType,
654  typename DeviceAdapterTag,
655  typename ThreadIndicesType,
656  typename R,
657  typename P1,
658  typename P2,
659  typename P3,
660  typename P4,
661  typename P5>
662 VISKORES_EXEC void DoWorkletInvokeFunctor(
663  const WorkletType& worklet,
664  const viskores::internal::Invocation<ParameterInterface,
665  ControlInterface,
666  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5)>,
667  InputDomainIndex,
668  OutputToInputMapType,
669  VisitArrayType,
670  ThreadToOutputMapType,
671  DeviceAdapterTag>& invocation,
672  const ThreadIndicesType& threadIndices)
673 {
674  using Invocation = viskores::internal::Invocation<ParameterInterface,
675  ControlInterface,
676  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5)>,
677  InputDomainIndex,
678  OutputToInputMapType,
679  VisitArrayType,
680  ThreadToOutputMapType,
681  DeviceAdapterTag>;
682 
683  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
684  using FetchType1 = typename FetchInfo1::type;
685  FetchType1 fetch1;
686  auto p1 =
687  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
688 
689  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
690  using FetchType2 = typename FetchInfo2::type;
691  FetchType2 fetch2;
692  auto p2 =
693  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
694 
695  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
696  using FetchType3 = typename FetchInfo3::type;
697  FetchType3 fetch3;
698  auto p3 =
699  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
700 
701  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
702  using FetchType4 = typename FetchInfo4::type;
703  FetchType4 fetch4;
704  auto p4 =
705  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
706 
707  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
708  using FetchType5 = typename FetchInfo5::type;
709  FetchType5 fetch5;
710  auto p5 =
711  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
712 
713  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
714  using ReturnFetchType = typename FetchInfo0::type;
715  ReturnFetchType returnFetch;
716  // If you got a compile error on the following line, it probably means that
717  // the operator() of a worklet does not match the definition expected. One
718  // common problem is that the operator() method must be declared const. Check
719  // to make sure the "const" keyword is after parameters. Another common
720  // problem is that the type of one or more parameters is incompatible with
721  // the actual type that Viskores creates in the execution environment. Make sure
722  // that the types of the worklet operator() parameters match those in the
723  // ExecutionSignature. The compiler error might help you narrow down which
724  // parameter is wrong and the types that did not match.
725  auto r = worklet(p1, p2, p3, p4, p5);
726 
727  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
728  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
729  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
730  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
731  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
732 
733  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
734 }
735 
736 template <typename WorkletType,
737  typename ParameterInterface,
738  typename ControlInterface,
739  viskores::IdComponent InputDomainIndex,
740  typename OutputToInputMapType,
741  typename VisitArrayType,
742  typename ThreadToOutputMapType,
743  typename DeviceAdapterTag,
744  typename ThreadIndicesType,
745  typename P1,
746  typename P2,
747  typename P3,
748  typename P4,
749  typename P5>
750 VISKORES_EXEC void DoWorkletInvokeFunctor(
751  const WorkletType& worklet,
752  const viskores::internal::Invocation<ParameterInterface,
753  ControlInterface,
754  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5)>,
755  InputDomainIndex,
756  OutputToInputMapType,
757  VisitArrayType,
758  ThreadToOutputMapType,
759  DeviceAdapterTag>& invocation,
760  const ThreadIndicesType& threadIndices)
761 {
762  using Invocation =
763  viskores::internal::Invocation<ParameterInterface,
764  ControlInterface,
765  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5)>,
766  InputDomainIndex,
767  OutputToInputMapType,
768  VisitArrayType,
769  ThreadToOutputMapType,
770  DeviceAdapterTag>;
771 
772  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
773  using FetchType1 = typename FetchInfo1::type;
774  FetchType1 fetch1;
775  auto p1 =
776  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
777 
778  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
779  using FetchType2 = typename FetchInfo2::type;
780  FetchType2 fetch2;
781  auto p2 =
782  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
783 
784  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
785  using FetchType3 = typename FetchInfo3::type;
786  FetchType3 fetch3;
787  auto p3 =
788  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
789 
790  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
791  using FetchType4 = typename FetchInfo4::type;
792  FetchType4 fetch4;
793  auto p4 =
794  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
795 
796  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
797  using FetchType5 = typename FetchInfo5::type;
798  FetchType5 fetch5;
799  auto p5 =
800  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
801 
802  // If you got a compile error on the following line, it probably means that
803  // the operator() of a worklet does not match the definition expected. One
804  // common problem is that the operator() method must be declared const. Check
805  // to make sure the "const" keyword is after parameters. Another common
806  // problem is that the type of one or more parameters is incompatible with
807  // the actual type that Viskores creates in the execution environment. Make sure
808  // that the types of the worklet operator() parameters match those in the
809  // ExecutionSignature. The compiler error might help you narrow down which
810  // parameter is wrong and the types that did not match.
811  worklet(p1, p2, p3, p4, p5);
812 
813  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
814  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
815  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
816  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
817  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
818 }
819 
820 template <typename WorkletType,
821  typename ParameterInterface,
822  typename ControlInterface,
823  viskores::IdComponent InputDomainIndex,
824  typename OutputToInputMapType,
825  typename VisitArrayType,
826  typename ThreadToOutputMapType,
827  typename DeviceAdapterTag,
828  typename ThreadIndicesType,
829  typename R,
830  typename P1,
831  typename P2,
832  typename P3,
833  typename P4,
834  typename P5,
835  typename P6>
836 VISKORES_EXEC void DoWorkletInvokeFunctor(
837  const WorkletType& worklet,
838  const viskores::internal::Invocation<ParameterInterface,
839  ControlInterface,
840  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6)>,
841  InputDomainIndex,
842  OutputToInputMapType,
843  VisitArrayType,
844  ThreadToOutputMapType,
845  DeviceAdapterTag>& invocation,
846  const ThreadIndicesType& threadIndices)
847 {
848  using Invocation = viskores::internal::Invocation<ParameterInterface,
849  ControlInterface,
850  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6)>,
851  InputDomainIndex,
852  OutputToInputMapType,
853  VisitArrayType,
854  ThreadToOutputMapType,
855  DeviceAdapterTag>;
856 
857  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
858  using FetchType1 = typename FetchInfo1::type;
859  FetchType1 fetch1;
860  auto p1 =
861  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
862 
863  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
864  using FetchType2 = typename FetchInfo2::type;
865  FetchType2 fetch2;
866  auto p2 =
867  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
868 
869  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
870  using FetchType3 = typename FetchInfo3::type;
871  FetchType3 fetch3;
872  auto p3 =
873  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
874 
875  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
876  using FetchType4 = typename FetchInfo4::type;
877  FetchType4 fetch4;
878  auto p4 =
879  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
880 
881  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
882  using FetchType5 = typename FetchInfo5::type;
883  FetchType5 fetch5;
884  auto p5 =
885  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
886 
887  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
888  using FetchType6 = typename FetchInfo6::type;
889  FetchType6 fetch6;
890  auto p6 =
891  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
892 
893  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
894  using ReturnFetchType = typename FetchInfo0::type;
895  ReturnFetchType returnFetch;
896  // If you got a compile error on the following line, it probably means that
897  // the operator() of a worklet does not match the definition expected. One
898  // common problem is that the operator() method must be declared const. Check
899  // to make sure the "const" keyword is after parameters. Another common
900  // problem is that the type of one or more parameters is incompatible with
901  // the actual type that Viskores creates in the execution environment. Make sure
902  // that the types of the worklet operator() parameters match those in the
903  // ExecutionSignature. The compiler error might help you narrow down which
904  // parameter is wrong and the types that did not match.
905  auto r = worklet(p1, p2, p3, p4, p5, p6);
906 
907  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
908  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
909  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
910  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
911  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
912  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
913 
914  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
915 }
916 
917 template <typename WorkletType,
918  typename ParameterInterface,
919  typename ControlInterface,
920  viskores::IdComponent InputDomainIndex,
921  typename OutputToInputMapType,
922  typename VisitArrayType,
923  typename ThreadToOutputMapType,
924  typename DeviceAdapterTag,
925  typename ThreadIndicesType,
926  typename P1,
927  typename P2,
928  typename P3,
929  typename P4,
930  typename P5,
931  typename P6>
932 VISKORES_EXEC void DoWorkletInvokeFunctor(
933  const WorkletType& worklet,
934  const viskores::internal::Invocation<ParameterInterface,
935  ControlInterface,
936  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6)>,
937  InputDomainIndex,
938  OutputToInputMapType,
939  VisitArrayType,
940  ThreadToOutputMapType,
941  DeviceAdapterTag>& invocation,
942  const ThreadIndicesType& threadIndices)
943 {
944  using Invocation =
945  viskores::internal::Invocation<ParameterInterface,
946  ControlInterface,
947  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6)>,
948  InputDomainIndex,
949  OutputToInputMapType,
950  VisitArrayType,
951  ThreadToOutputMapType,
952  DeviceAdapterTag>;
953 
954  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
955  using FetchType1 = typename FetchInfo1::type;
956  FetchType1 fetch1;
957  auto p1 =
958  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
959 
960  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
961  using FetchType2 = typename FetchInfo2::type;
962  FetchType2 fetch2;
963  auto p2 =
964  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
965 
966  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
967  using FetchType3 = typename FetchInfo3::type;
968  FetchType3 fetch3;
969  auto p3 =
970  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
971 
972  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
973  using FetchType4 = typename FetchInfo4::type;
974  FetchType4 fetch4;
975  auto p4 =
976  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
977 
978  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
979  using FetchType5 = typename FetchInfo5::type;
980  FetchType5 fetch5;
981  auto p5 =
982  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
983 
984  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
985  using FetchType6 = typename FetchInfo6::type;
986  FetchType6 fetch6;
987  auto p6 =
988  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
989 
990  // If you got a compile error on the following line, it probably means that
991  // the operator() of a worklet does not match the definition expected. One
992  // common problem is that the operator() method must be declared const. Check
993  // to make sure the "const" keyword is after parameters. Another common
994  // problem is that the type of one or more parameters is incompatible with
995  // the actual type that Viskores creates in the execution environment. Make sure
996  // that the types of the worklet operator() parameters match those in the
997  // ExecutionSignature. The compiler error might help you narrow down which
998  // parameter is wrong and the types that did not match.
999  worklet(p1, p2, p3, p4, p5, p6);
1000 
1001  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
1002  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
1003  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
1004  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
1005  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
1006  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
1007 }
1008 
1009 template <typename WorkletType,
1010  typename ParameterInterface,
1011  typename ControlInterface,
1012  viskores::IdComponent InputDomainIndex,
1013  typename OutputToInputMapType,
1014  typename VisitArrayType,
1015  typename ThreadToOutputMapType,
1016  typename DeviceAdapterTag,
1017  typename ThreadIndicesType,
1018  typename R,
1019  typename P1,
1020  typename P2,
1021  typename P3,
1022  typename P4,
1023  typename P5,
1024  typename P6,
1025  typename P7>
1026 VISKORES_EXEC void DoWorkletInvokeFunctor(
1027  const WorkletType& worklet,
1028  const viskores::internal::Invocation<ParameterInterface,
1029  ControlInterface,
1030  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7)>,
1031  InputDomainIndex,
1032  OutputToInputMapType,
1033  VisitArrayType,
1034  ThreadToOutputMapType,
1035  DeviceAdapterTag>& invocation,
1036  const ThreadIndicesType& threadIndices)
1037 {
1038  using Invocation = viskores::internal::Invocation<ParameterInterface,
1039  ControlInterface,
1040  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7)>,
1041  InputDomainIndex,
1042  OutputToInputMapType,
1043  VisitArrayType,
1044  ThreadToOutputMapType,
1045  DeviceAdapterTag>;
1046 
1047  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
1048  using FetchType1 = typename FetchInfo1::type;
1049  FetchType1 fetch1;
1050  auto p1 =
1051  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
1052 
1053  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
1054  using FetchType2 = typename FetchInfo2::type;
1055  FetchType2 fetch2;
1056  auto p2 =
1057  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
1058 
1059  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
1060  using FetchType3 = typename FetchInfo3::type;
1061  FetchType3 fetch3;
1062  auto p3 =
1063  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
1064 
1065  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
1066  using FetchType4 = typename FetchInfo4::type;
1067  FetchType4 fetch4;
1068  auto p4 =
1069  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
1070 
1071  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
1072  using FetchType5 = typename FetchInfo5::type;
1073  FetchType5 fetch5;
1074  auto p5 =
1075  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
1076 
1077  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
1078  using FetchType6 = typename FetchInfo6::type;
1079  FetchType6 fetch6;
1080  auto p6 =
1081  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
1082 
1083  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
1084  using FetchType7 = typename FetchInfo7::type;
1085  FetchType7 fetch7;
1086  auto p7 =
1087  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
1088 
1089  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
1090  using ReturnFetchType = typename FetchInfo0::type;
1091  ReturnFetchType returnFetch;
1092  // If you got a compile error on the following line, it probably means that
1093  // the operator() of a worklet does not match the definition expected. One
1094  // common problem is that the operator() method must be declared const. Check
1095  // to make sure the "const" keyword is after parameters. Another common
1096  // problem is that the type of one or more parameters is incompatible with
1097  // the actual type that Viskores creates in the execution environment. Make sure
1098  // that the types of the worklet operator() parameters match those in the
1099  // ExecutionSignature. The compiler error might help you narrow down which
1100  // parameter is wrong and the types that did not match.
1101  auto r = worklet(p1, p2, p3, p4, p5, p6, p7);
1102 
1103  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
1104  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
1105  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
1106  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
1107  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
1108  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
1109  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
1110 
1111  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
1112 }
1113 
1114 template <typename WorkletType,
1115  typename ParameterInterface,
1116  typename ControlInterface,
1117  viskores::IdComponent InputDomainIndex,
1118  typename OutputToInputMapType,
1119  typename VisitArrayType,
1120  typename ThreadToOutputMapType,
1121  typename DeviceAdapterTag,
1122  typename ThreadIndicesType,
1123  typename P1,
1124  typename P2,
1125  typename P3,
1126  typename P4,
1127  typename P5,
1128  typename P6,
1129  typename P7>
1130 VISKORES_EXEC void DoWorkletInvokeFunctor(
1131  const WorkletType& worklet,
1132  const viskores::internal::Invocation<ParameterInterface,
1133  ControlInterface,
1134  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7)>,
1135  InputDomainIndex,
1136  OutputToInputMapType,
1137  VisitArrayType,
1138  ThreadToOutputMapType,
1139  DeviceAdapterTag>& invocation,
1140  const ThreadIndicesType& threadIndices)
1141 {
1142  using Invocation =
1143  viskores::internal::Invocation<ParameterInterface,
1144  ControlInterface,
1145  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7)>,
1146  InputDomainIndex,
1147  OutputToInputMapType,
1148  VisitArrayType,
1149  ThreadToOutputMapType,
1150  DeviceAdapterTag>;
1151 
1152  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
1153  using FetchType1 = typename FetchInfo1::type;
1154  FetchType1 fetch1;
1155  auto p1 =
1156  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
1157 
1158  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
1159  using FetchType2 = typename FetchInfo2::type;
1160  FetchType2 fetch2;
1161  auto p2 =
1162  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
1163 
1164  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
1165  using FetchType3 = typename FetchInfo3::type;
1166  FetchType3 fetch3;
1167  auto p3 =
1168  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
1169 
1170  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
1171  using FetchType4 = typename FetchInfo4::type;
1172  FetchType4 fetch4;
1173  auto p4 =
1174  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
1175 
1176  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
1177  using FetchType5 = typename FetchInfo5::type;
1178  FetchType5 fetch5;
1179  auto p5 =
1180  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
1181 
1182  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
1183  using FetchType6 = typename FetchInfo6::type;
1184  FetchType6 fetch6;
1185  auto p6 =
1186  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
1187 
1188  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
1189  using FetchType7 = typename FetchInfo7::type;
1190  FetchType7 fetch7;
1191  auto p7 =
1192  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
1193 
1194  // If you got a compile error on the following line, it probably means that
1195  // the operator() of a worklet does not match the definition expected. One
1196  // common problem is that the operator() method must be declared const. Check
1197  // to make sure the "const" keyword is after parameters. Another common
1198  // problem is that the type of one or more parameters is incompatible with
1199  // the actual type that Viskores creates in the execution environment. Make sure
1200  // that the types of the worklet operator() parameters match those in the
1201  // ExecutionSignature. The compiler error might help you narrow down which
1202  // parameter is wrong and the types that did not match.
1203  worklet(p1, p2, p3, p4, p5, p6, p7);
1204 
1205  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
1206  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
1207  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
1208  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
1209  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
1210  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
1211  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
1212 }
1213 
1214 template <typename WorkletType,
1215  typename ParameterInterface,
1216  typename ControlInterface,
1217  viskores::IdComponent InputDomainIndex,
1218  typename OutputToInputMapType,
1219  typename VisitArrayType,
1220  typename ThreadToOutputMapType,
1221  typename DeviceAdapterTag,
1222  typename ThreadIndicesType,
1223  typename R,
1224  typename P1,
1225  typename P2,
1226  typename P3,
1227  typename P4,
1228  typename P5,
1229  typename P6,
1230  typename P7,
1231  typename P8>
1232 VISKORES_EXEC void DoWorkletInvokeFunctor(
1233  const WorkletType& worklet,
1234  const viskores::internal::Invocation<ParameterInterface,
1235  ControlInterface,
1236  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8)>,
1237  InputDomainIndex,
1238  OutputToInputMapType,
1239  VisitArrayType,
1240  ThreadToOutputMapType,
1241  DeviceAdapterTag>& invocation,
1242  const ThreadIndicesType& threadIndices)
1243 {
1244  using Invocation = viskores::internal::Invocation<ParameterInterface,
1245  ControlInterface,
1246  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8)>,
1247  InputDomainIndex,
1248  OutputToInputMapType,
1249  VisitArrayType,
1250  ThreadToOutputMapType,
1251  DeviceAdapterTag>;
1252 
1253  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
1254  using FetchType1 = typename FetchInfo1::type;
1255  FetchType1 fetch1;
1256  auto p1 =
1257  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
1258 
1259  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
1260  using FetchType2 = typename FetchInfo2::type;
1261  FetchType2 fetch2;
1262  auto p2 =
1263  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
1264 
1265  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
1266  using FetchType3 = typename FetchInfo3::type;
1267  FetchType3 fetch3;
1268  auto p3 =
1269  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
1270 
1271  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
1272  using FetchType4 = typename FetchInfo4::type;
1273  FetchType4 fetch4;
1274  auto p4 =
1275  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
1276 
1277  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
1278  using FetchType5 = typename FetchInfo5::type;
1279  FetchType5 fetch5;
1280  auto p5 =
1281  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
1282 
1283  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
1284  using FetchType6 = typename FetchInfo6::type;
1285  FetchType6 fetch6;
1286  auto p6 =
1287  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
1288 
1289  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
1290  using FetchType7 = typename FetchInfo7::type;
1291  FetchType7 fetch7;
1292  auto p7 =
1293  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
1294 
1295  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
1296  using FetchType8 = typename FetchInfo8::type;
1297  FetchType8 fetch8;
1298  auto p8 =
1299  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
1300 
1301  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
1302  using ReturnFetchType = typename FetchInfo0::type;
1303  ReturnFetchType returnFetch;
1304  // If you got a compile error on the following line, it probably means that
1305  // the operator() of a worklet does not match the definition expected. One
1306  // common problem is that the operator() method must be declared const. Check
1307  // to make sure the "const" keyword is after parameters. Another common
1308  // problem is that the type of one or more parameters is incompatible with
1309  // the actual type that Viskores creates in the execution environment. Make sure
1310  // that the types of the worklet operator() parameters match those in the
1311  // ExecutionSignature. The compiler error might help you narrow down which
1312  // parameter is wrong and the types that did not match.
1313  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8);
1314 
1315  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
1316  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
1317  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
1318  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
1319  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
1320  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
1321  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
1322  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
1323 
1324  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
1325 }
1326 
1327 template <typename WorkletType,
1328  typename ParameterInterface,
1329  typename ControlInterface,
1330  viskores::IdComponent InputDomainIndex,
1331  typename OutputToInputMapType,
1332  typename VisitArrayType,
1333  typename ThreadToOutputMapType,
1334  typename DeviceAdapterTag,
1335  typename ThreadIndicesType,
1336  typename P1,
1337  typename P2,
1338  typename P3,
1339  typename P4,
1340  typename P5,
1341  typename P6,
1342  typename P7,
1343  typename P8>
1344 VISKORES_EXEC void DoWorkletInvokeFunctor(
1345  const WorkletType& worklet,
1346  const viskores::internal::Invocation<ParameterInterface,
1347  ControlInterface,
1348  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8)>,
1349  InputDomainIndex,
1350  OutputToInputMapType,
1351  VisitArrayType,
1352  ThreadToOutputMapType,
1353  DeviceAdapterTag>& invocation,
1354  const ThreadIndicesType& threadIndices)
1355 {
1356  using Invocation =
1357  viskores::internal::Invocation<ParameterInterface,
1358  ControlInterface,
1359  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8)>,
1360  InputDomainIndex,
1361  OutputToInputMapType,
1362  VisitArrayType,
1363  ThreadToOutputMapType,
1364  DeviceAdapterTag>;
1365 
1366  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
1367  using FetchType1 = typename FetchInfo1::type;
1368  FetchType1 fetch1;
1369  auto p1 =
1370  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
1371 
1372  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
1373  using FetchType2 = typename FetchInfo2::type;
1374  FetchType2 fetch2;
1375  auto p2 =
1376  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
1377 
1378  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
1379  using FetchType3 = typename FetchInfo3::type;
1380  FetchType3 fetch3;
1381  auto p3 =
1382  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
1383 
1384  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
1385  using FetchType4 = typename FetchInfo4::type;
1386  FetchType4 fetch4;
1387  auto p4 =
1388  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
1389 
1390  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
1391  using FetchType5 = typename FetchInfo5::type;
1392  FetchType5 fetch5;
1393  auto p5 =
1394  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
1395 
1396  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
1397  using FetchType6 = typename FetchInfo6::type;
1398  FetchType6 fetch6;
1399  auto p6 =
1400  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
1401 
1402  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
1403  using FetchType7 = typename FetchInfo7::type;
1404  FetchType7 fetch7;
1405  auto p7 =
1406  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
1407 
1408  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
1409  using FetchType8 = typename FetchInfo8::type;
1410  FetchType8 fetch8;
1411  auto p8 =
1412  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
1413 
1414  // If you got a compile error on the following line, it probably means that
1415  // the operator() of a worklet does not match the definition expected. One
1416  // common problem is that the operator() method must be declared const. Check
1417  // to make sure the "const" keyword is after parameters. Another common
1418  // problem is that the type of one or more parameters is incompatible with
1419  // the actual type that Viskores creates in the execution environment. Make sure
1420  // that the types of the worklet operator() parameters match those in the
1421  // ExecutionSignature. The compiler error might help you narrow down which
1422  // parameter is wrong and the types that did not match.
1423  worklet(p1, p2, p3, p4, p5, p6, p7, p8);
1424 
1425  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
1426  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
1427  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
1428  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
1429  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
1430  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
1431  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
1432  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
1433 }
1434 
1435 template <typename WorkletType,
1436  typename ParameterInterface,
1437  typename ControlInterface,
1438  viskores::IdComponent InputDomainIndex,
1439  typename OutputToInputMapType,
1440  typename VisitArrayType,
1441  typename ThreadToOutputMapType,
1442  typename DeviceAdapterTag,
1443  typename ThreadIndicesType,
1444  typename R,
1445  typename P1,
1446  typename P2,
1447  typename P3,
1448  typename P4,
1449  typename P5,
1450  typename P6,
1451  typename P7,
1452  typename P8,
1453  typename P9>
1454 VISKORES_EXEC void DoWorkletInvokeFunctor(
1455  const WorkletType& worklet,
1456  const viskores::internal::Invocation<ParameterInterface,
1457  ControlInterface,
1458  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9)>,
1459  InputDomainIndex,
1460  OutputToInputMapType,
1461  VisitArrayType,
1462  ThreadToOutputMapType,
1463  DeviceAdapterTag>& invocation,
1464  const ThreadIndicesType& threadIndices)
1465 {
1466  using Invocation = viskores::internal::Invocation<ParameterInterface,
1467  ControlInterface,
1468  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9)>,
1469  InputDomainIndex,
1470  OutputToInputMapType,
1471  VisitArrayType,
1472  ThreadToOutputMapType,
1473  DeviceAdapterTag>;
1474 
1475  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
1476  using FetchType1 = typename FetchInfo1::type;
1477  FetchType1 fetch1;
1478  auto p1 =
1479  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
1480 
1481  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
1482  using FetchType2 = typename FetchInfo2::type;
1483  FetchType2 fetch2;
1484  auto p2 =
1485  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
1486 
1487  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
1488  using FetchType3 = typename FetchInfo3::type;
1489  FetchType3 fetch3;
1490  auto p3 =
1491  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
1492 
1493  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
1494  using FetchType4 = typename FetchInfo4::type;
1495  FetchType4 fetch4;
1496  auto p4 =
1497  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
1498 
1499  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
1500  using FetchType5 = typename FetchInfo5::type;
1501  FetchType5 fetch5;
1502  auto p5 =
1503  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
1504 
1505  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
1506  using FetchType6 = typename FetchInfo6::type;
1507  FetchType6 fetch6;
1508  auto p6 =
1509  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
1510 
1511  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
1512  using FetchType7 = typename FetchInfo7::type;
1513  FetchType7 fetch7;
1514  auto p7 =
1515  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
1516 
1517  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
1518  using FetchType8 = typename FetchInfo8::type;
1519  FetchType8 fetch8;
1520  auto p8 =
1521  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
1522 
1523  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
1524  using FetchType9 = typename FetchInfo9::type;
1525  FetchType9 fetch9;
1526  auto p9 =
1527  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
1528 
1529  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
1530  using ReturnFetchType = typename FetchInfo0::type;
1531  ReturnFetchType returnFetch;
1532  // If you got a compile error on the following line, it probably means that
1533  // the operator() of a worklet does not match the definition expected. One
1534  // common problem is that the operator() method must be declared const. Check
1535  // to make sure the "const" keyword is after parameters. Another common
1536  // problem is that the type of one or more parameters is incompatible with
1537  // the actual type that Viskores creates in the execution environment. Make sure
1538  // that the types of the worklet operator() parameters match those in the
1539  // ExecutionSignature. The compiler error might help you narrow down which
1540  // parameter is wrong and the types that did not match.
1541  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9);
1542 
1543  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
1544  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
1545  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
1546  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
1547  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
1548  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
1549  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
1550  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
1551  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
1552 
1553  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
1554 }
1555 
1556 template <typename WorkletType,
1557  typename ParameterInterface,
1558  typename ControlInterface,
1559  viskores::IdComponent InputDomainIndex,
1560  typename OutputToInputMapType,
1561  typename VisitArrayType,
1562  typename ThreadToOutputMapType,
1563  typename DeviceAdapterTag,
1564  typename ThreadIndicesType,
1565  typename P1,
1566  typename P2,
1567  typename P3,
1568  typename P4,
1569  typename P5,
1570  typename P6,
1571  typename P7,
1572  typename P8,
1573  typename P9>
1574 VISKORES_EXEC void DoWorkletInvokeFunctor(
1575  const WorkletType& worklet,
1576  const viskores::internal::Invocation<ParameterInterface,
1577  ControlInterface,
1578  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9)>,
1579  InputDomainIndex,
1580  OutputToInputMapType,
1581  VisitArrayType,
1582  ThreadToOutputMapType,
1583  DeviceAdapterTag>& invocation,
1584  const ThreadIndicesType& threadIndices)
1585 {
1586  using Invocation =
1587  viskores::internal::Invocation<ParameterInterface,
1588  ControlInterface,
1589  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9)>,
1590  InputDomainIndex,
1591  OutputToInputMapType,
1592  VisitArrayType,
1593  ThreadToOutputMapType,
1594  DeviceAdapterTag>;
1595 
1596  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
1597  using FetchType1 = typename FetchInfo1::type;
1598  FetchType1 fetch1;
1599  auto p1 =
1600  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
1601 
1602  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
1603  using FetchType2 = typename FetchInfo2::type;
1604  FetchType2 fetch2;
1605  auto p2 =
1606  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
1607 
1608  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
1609  using FetchType3 = typename FetchInfo3::type;
1610  FetchType3 fetch3;
1611  auto p3 =
1612  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
1613 
1614  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
1615  using FetchType4 = typename FetchInfo4::type;
1616  FetchType4 fetch4;
1617  auto p4 =
1618  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
1619 
1620  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
1621  using FetchType5 = typename FetchInfo5::type;
1622  FetchType5 fetch5;
1623  auto p5 =
1624  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
1625 
1626  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
1627  using FetchType6 = typename FetchInfo6::type;
1628  FetchType6 fetch6;
1629  auto p6 =
1630  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
1631 
1632  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
1633  using FetchType7 = typename FetchInfo7::type;
1634  FetchType7 fetch7;
1635  auto p7 =
1636  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
1637 
1638  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
1639  using FetchType8 = typename FetchInfo8::type;
1640  FetchType8 fetch8;
1641  auto p8 =
1642  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
1643 
1644  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
1645  using FetchType9 = typename FetchInfo9::type;
1646  FetchType9 fetch9;
1647  auto p9 =
1648  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
1649 
1650  // If you got a compile error on the following line, it probably means that
1651  // the operator() of a worklet does not match the definition expected. One
1652  // common problem is that the operator() method must be declared const. Check
1653  // to make sure the "const" keyword is after parameters. Another common
1654  // problem is that the type of one or more parameters is incompatible with
1655  // the actual type that Viskores creates in the execution environment. Make sure
1656  // that the types of the worklet operator() parameters match those in the
1657  // ExecutionSignature. The compiler error might help you narrow down which
1658  // parameter is wrong and the types that did not match.
1659  worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9);
1660 
1661  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
1662  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
1663  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
1664  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
1665  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
1666  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
1667  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
1668  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
1669  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
1670 }
1671 
1672 template <typename WorkletType,
1673  typename ParameterInterface,
1674  typename ControlInterface,
1675  viskores::IdComponent InputDomainIndex,
1676  typename OutputToInputMapType,
1677  typename VisitArrayType,
1678  typename ThreadToOutputMapType,
1679  typename DeviceAdapterTag,
1680  typename ThreadIndicesType,
1681  typename R,
1682  typename P1,
1683  typename P2,
1684  typename P3,
1685  typename P4,
1686  typename P5,
1687  typename P6,
1688  typename P7,
1689  typename P8,
1690  typename P9,
1691  typename P10>
1692 VISKORES_EXEC void DoWorkletInvokeFunctor(
1693  const WorkletType& worklet,
1694  const viskores::internal::Invocation<ParameterInterface,
1695  ControlInterface,
1696  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)>,
1697  InputDomainIndex,
1698  OutputToInputMapType,
1699  VisitArrayType,
1700  ThreadToOutputMapType,
1701  DeviceAdapterTag>& invocation,
1702  const ThreadIndicesType& threadIndices)
1703 {
1704  using Invocation = viskores::internal::Invocation<ParameterInterface,
1705  ControlInterface,
1706  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)>,
1707  InputDomainIndex,
1708  OutputToInputMapType,
1709  VisitArrayType,
1710  ThreadToOutputMapType,
1711  DeviceAdapterTag>;
1712 
1713  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
1714  using FetchType1 = typename FetchInfo1::type;
1715  FetchType1 fetch1;
1716  auto p1 =
1717  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
1718 
1719  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
1720  using FetchType2 = typename FetchInfo2::type;
1721  FetchType2 fetch2;
1722  auto p2 =
1723  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
1724 
1725  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
1726  using FetchType3 = typename FetchInfo3::type;
1727  FetchType3 fetch3;
1728  auto p3 =
1729  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
1730 
1731  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
1732  using FetchType4 = typename FetchInfo4::type;
1733  FetchType4 fetch4;
1734  auto p4 =
1735  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
1736 
1737  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
1738  using FetchType5 = typename FetchInfo5::type;
1739  FetchType5 fetch5;
1740  auto p5 =
1741  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
1742 
1743  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
1744  using FetchType6 = typename FetchInfo6::type;
1745  FetchType6 fetch6;
1746  auto p6 =
1747  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
1748 
1749  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
1750  using FetchType7 = typename FetchInfo7::type;
1751  FetchType7 fetch7;
1752  auto p7 =
1753  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
1754 
1755  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
1756  using FetchType8 = typename FetchInfo8::type;
1757  FetchType8 fetch8;
1758  auto p8 =
1759  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
1760 
1761  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
1762  using FetchType9 = typename FetchInfo9::type;
1763  FetchType9 fetch9;
1764  auto p9 =
1765  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
1766 
1767  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
1768  using FetchType10 = typename FetchInfo10::type;
1769  FetchType10 fetch10;
1770  auto p10 =
1771  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
1772 
1773  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
1774  using ReturnFetchType = typename FetchInfo0::type;
1775  ReturnFetchType returnFetch;
1776  // If you got a compile error on the following line, it probably means that
1777  // the operator() of a worklet does not match the definition expected. One
1778  // common problem is that the operator() method must be declared const. Check
1779  // to make sure the "const" keyword is after parameters. Another common
1780  // problem is that the type of one or more parameters is incompatible with
1781  // the actual type that Viskores creates in the execution environment. Make sure
1782  // that the types of the worklet operator() parameters match those in the
1783  // ExecutionSignature. The compiler error might help you narrow down which
1784  // parameter is wrong and the types that did not match.
1785  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
1786 
1787  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
1788  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
1789  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
1790  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
1791  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
1792  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
1793  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
1794  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
1795  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
1796  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
1797 
1798  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
1799 }
1800 
1801 template <typename WorkletType,
1802  typename ParameterInterface,
1803  typename ControlInterface,
1804  viskores::IdComponent InputDomainIndex,
1805  typename OutputToInputMapType,
1806  typename VisitArrayType,
1807  typename ThreadToOutputMapType,
1808  typename DeviceAdapterTag,
1809  typename ThreadIndicesType,
1810  typename P1,
1811  typename P2,
1812  typename P3,
1813  typename P4,
1814  typename P5,
1815  typename P6,
1816  typename P7,
1817  typename P8,
1818  typename P9,
1819  typename P10>
1820 VISKORES_EXEC void DoWorkletInvokeFunctor(
1821  const WorkletType& worklet,
1822  const viskores::internal::Invocation<ParameterInterface,
1823  ControlInterface,
1824  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)>,
1825  InputDomainIndex,
1826  OutputToInputMapType,
1827  VisitArrayType,
1828  ThreadToOutputMapType,
1829  DeviceAdapterTag>& invocation,
1830  const ThreadIndicesType& threadIndices)
1831 {
1832  using Invocation =
1833  viskores::internal::Invocation<ParameterInterface,
1834  ControlInterface,
1835  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)>,
1836  InputDomainIndex,
1837  OutputToInputMapType,
1838  VisitArrayType,
1839  ThreadToOutputMapType,
1840  DeviceAdapterTag>;
1841 
1842  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
1843  using FetchType1 = typename FetchInfo1::type;
1844  FetchType1 fetch1;
1845  auto p1 =
1846  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
1847 
1848  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
1849  using FetchType2 = typename FetchInfo2::type;
1850  FetchType2 fetch2;
1851  auto p2 =
1852  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
1853 
1854  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
1855  using FetchType3 = typename FetchInfo3::type;
1856  FetchType3 fetch3;
1857  auto p3 =
1858  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
1859 
1860  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
1861  using FetchType4 = typename FetchInfo4::type;
1862  FetchType4 fetch4;
1863  auto p4 =
1864  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
1865 
1866  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
1867  using FetchType5 = typename FetchInfo5::type;
1868  FetchType5 fetch5;
1869  auto p5 =
1870  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
1871 
1872  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
1873  using FetchType6 = typename FetchInfo6::type;
1874  FetchType6 fetch6;
1875  auto p6 =
1876  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
1877 
1878  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
1879  using FetchType7 = typename FetchInfo7::type;
1880  FetchType7 fetch7;
1881  auto p7 =
1882  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
1883 
1884  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
1885  using FetchType8 = typename FetchInfo8::type;
1886  FetchType8 fetch8;
1887  auto p8 =
1888  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
1889 
1890  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
1891  using FetchType9 = typename FetchInfo9::type;
1892  FetchType9 fetch9;
1893  auto p9 =
1894  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
1895 
1896  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
1897  using FetchType10 = typename FetchInfo10::type;
1898  FetchType10 fetch10;
1899  auto p10 =
1900  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
1901 
1902  // If you got a compile error on the following line, it probably means that
1903  // the operator() of a worklet does not match the definition expected. One
1904  // common problem is that the operator() method must be declared const. Check
1905  // to make sure the "const" keyword is after parameters. Another common
1906  // problem is that the type of one or more parameters is incompatible with
1907  // the actual type that Viskores creates in the execution environment. Make sure
1908  // that the types of the worklet operator() parameters match those in the
1909  // ExecutionSignature. The compiler error might help you narrow down which
1910  // parameter is wrong and the types that did not match.
1911  worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
1912 
1913  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
1914  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
1915  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
1916  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
1917  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
1918  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
1919  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
1920  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
1921  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
1922  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
1923 }
1924 
1925 template <typename WorkletType,
1926  typename ParameterInterface,
1927  typename ControlInterface,
1928  viskores::IdComponent InputDomainIndex,
1929  typename OutputToInputMapType,
1930  typename VisitArrayType,
1931  typename ThreadToOutputMapType,
1932  typename DeviceAdapterTag,
1933  typename ThreadIndicesType,
1934  typename R,
1935  typename P1,
1936  typename P2,
1937  typename P3,
1938  typename P4,
1939  typename P5,
1940  typename P6,
1941  typename P7,
1942  typename P8,
1943  typename P9,
1944  typename P10,
1945  typename P11>
1946 VISKORES_EXEC void DoWorkletInvokeFunctor(
1947  const WorkletType& worklet,
1948  const viskores::internal::Invocation<ParameterInterface,
1949  ControlInterface,
1950  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)>,
1951  InputDomainIndex,
1952  OutputToInputMapType,
1953  VisitArrayType,
1954  ThreadToOutputMapType,
1955  DeviceAdapterTag>& invocation,
1956  const ThreadIndicesType& threadIndices)
1957 {
1958  using Invocation = viskores::internal::Invocation<ParameterInterface,
1959  ControlInterface,
1960  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)>,
1961  InputDomainIndex,
1962  OutputToInputMapType,
1963  VisitArrayType,
1964  ThreadToOutputMapType,
1965  DeviceAdapterTag>;
1966 
1967  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
1968  using FetchType1 = typename FetchInfo1::type;
1969  FetchType1 fetch1;
1970  auto p1 =
1971  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
1972 
1973  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
1974  using FetchType2 = typename FetchInfo2::type;
1975  FetchType2 fetch2;
1976  auto p2 =
1977  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
1978 
1979  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
1980  using FetchType3 = typename FetchInfo3::type;
1981  FetchType3 fetch3;
1982  auto p3 =
1983  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
1984 
1985  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
1986  using FetchType4 = typename FetchInfo4::type;
1987  FetchType4 fetch4;
1988  auto p4 =
1989  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
1990 
1991  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
1992  using FetchType5 = typename FetchInfo5::type;
1993  FetchType5 fetch5;
1994  auto p5 =
1995  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
1996 
1997  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
1998  using FetchType6 = typename FetchInfo6::type;
1999  FetchType6 fetch6;
2000  auto p6 =
2001  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
2002 
2003  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
2004  using FetchType7 = typename FetchInfo7::type;
2005  FetchType7 fetch7;
2006  auto p7 =
2007  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
2008 
2009  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
2010  using FetchType8 = typename FetchInfo8::type;
2011  FetchType8 fetch8;
2012  auto p8 =
2013  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
2014 
2015  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
2016  using FetchType9 = typename FetchInfo9::type;
2017  FetchType9 fetch9;
2018  auto p9 =
2019  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
2020 
2021  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
2022  using FetchType10 = typename FetchInfo10::type;
2023  FetchType10 fetch10;
2024  auto p10 =
2025  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
2026 
2027  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
2028  using FetchType11 = typename FetchInfo11::type;
2029  FetchType11 fetch11;
2030  auto p11 =
2031  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
2032 
2033  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
2034  using ReturnFetchType = typename FetchInfo0::type;
2035  ReturnFetchType returnFetch;
2036  // If you got a compile error on the following line, it probably means that
2037  // the operator() of a worklet does not match the definition expected. One
2038  // common problem is that the operator() method must be declared const. Check
2039  // to make sure the "const" keyword is after parameters. Another common
2040  // problem is that the type of one or more parameters is incompatible with
2041  // the actual type that Viskores creates in the execution environment. Make sure
2042  // that the types of the worklet operator() parameters match those in the
2043  // ExecutionSignature. The compiler error might help you narrow down which
2044  // parameter is wrong and the types that did not match.
2045  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
2046 
2047  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
2048  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
2049  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
2050  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
2051  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
2052  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
2053  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
2054  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
2055  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
2056  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
2057  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
2058 
2059  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
2060 }
2061 
2062 template <typename WorkletType,
2063  typename ParameterInterface,
2064  typename ControlInterface,
2065  viskores::IdComponent InputDomainIndex,
2066  typename OutputToInputMapType,
2067  typename VisitArrayType,
2068  typename ThreadToOutputMapType,
2069  typename DeviceAdapterTag,
2070  typename ThreadIndicesType,
2071  typename P1,
2072  typename P2,
2073  typename P3,
2074  typename P4,
2075  typename P5,
2076  typename P6,
2077  typename P7,
2078  typename P8,
2079  typename P9,
2080  typename P10,
2081  typename P11>
2082 VISKORES_EXEC void DoWorkletInvokeFunctor(
2083  const WorkletType& worklet,
2084  const viskores::internal::Invocation<ParameterInterface,
2085  ControlInterface,
2086  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)>,
2087  InputDomainIndex,
2088  OutputToInputMapType,
2089  VisitArrayType,
2090  ThreadToOutputMapType,
2091  DeviceAdapterTag>& invocation,
2092  const ThreadIndicesType& threadIndices)
2093 {
2094  using Invocation =
2095  viskores::internal::Invocation<ParameterInterface,
2096  ControlInterface,
2097  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)>,
2098  InputDomainIndex,
2099  OutputToInputMapType,
2100  VisitArrayType,
2101  ThreadToOutputMapType,
2102  DeviceAdapterTag>;
2103 
2104  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
2105  using FetchType1 = typename FetchInfo1::type;
2106  FetchType1 fetch1;
2107  auto p1 =
2108  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
2109 
2110  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
2111  using FetchType2 = typename FetchInfo2::type;
2112  FetchType2 fetch2;
2113  auto p2 =
2114  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
2115 
2116  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
2117  using FetchType3 = typename FetchInfo3::type;
2118  FetchType3 fetch3;
2119  auto p3 =
2120  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
2121 
2122  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
2123  using FetchType4 = typename FetchInfo4::type;
2124  FetchType4 fetch4;
2125  auto p4 =
2126  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
2127 
2128  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
2129  using FetchType5 = typename FetchInfo5::type;
2130  FetchType5 fetch5;
2131  auto p5 =
2132  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
2133 
2134  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
2135  using FetchType6 = typename FetchInfo6::type;
2136  FetchType6 fetch6;
2137  auto p6 =
2138  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
2139 
2140  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
2141  using FetchType7 = typename FetchInfo7::type;
2142  FetchType7 fetch7;
2143  auto p7 =
2144  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
2145 
2146  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
2147  using FetchType8 = typename FetchInfo8::type;
2148  FetchType8 fetch8;
2149  auto p8 =
2150  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
2151 
2152  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
2153  using FetchType9 = typename FetchInfo9::type;
2154  FetchType9 fetch9;
2155  auto p9 =
2156  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
2157 
2158  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
2159  using FetchType10 = typename FetchInfo10::type;
2160  FetchType10 fetch10;
2161  auto p10 =
2162  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
2163 
2164  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
2165  using FetchType11 = typename FetchInfo11::type;
2166  FetchType11 fetch11;
2167  auto p11 =
2168  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
2169 
2170  // If you got a compile error on the following line, it probably means that
2171  // the operator() of a worklet does not match the definition expected. One
2172  // common problem is that the operator() method must be declared const. Check
2173  // to make sure the "const" keyword is after parameters. Another common
2174  // problem is that the type of one or more parameters is incompatible with
2175  // the actual type that Viskores creates in the execution environment. Make sure
2176  // that the types of the worklet operator() parameters match those in the
2177  // ExecutionSignature. The compiler error might help you narrow down which
2178  // parameter is wrong and the types that did not match.
2179  worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
2180 
2181  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
2182  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
2183  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
2184  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
2185  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
2186  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
2187  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
2188  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
2189  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
2190  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
2191  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
2192 }
2193 
2194 template <typename WorkletType,
2195  typename ParameterInterface,
2196  typename ControlInterface,
2197  viskores::IdComponent InputDomainIndex,
2198  typename OutputToInputMapType,
2199  typename VisitArrayType,
2200  typename ThreadToOutputMapType,
2201  typename DeviceAdapterTag,
2202  typename ThreadIndicesType,
2203  typename R,
2204  typename P1,
2205  typename P2,
2206  typename P3,
2207  typename P4,
2208  typename P5,
2209  typename P6,
2210  typename P7,
2211  typename P8,
2212  typename P9,
2213  typename P10,
2214  typename P11,
2215  typename P12>
2216 VISKORES_EXEC void DoWorkletInvokeFunctor(
2217  const WorkletType& worklet,
2218  const viskores::internal::Invocation<ParameterInterface,
2219  ControlInterface,
2220  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)>,
2221  InputDomainIndex,
2222  OutputToInputMapType,
2223  VisitArrayType,
2224  ThreadToOutputMapType,
2225  DeviceAdapterTag>& invocation,
2226  const ThreadIndicesType& threadIndices)
2227 {
2228  using Invocation = viskores::internal::Invocation<ParameterInterface,
2229  ControlInterface,
2230  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)>,
2231  InputDomainIndex,
2232  OutputToInputMapType,
2233  VisitArrayType,
2234  ThreadToOutputMapType,
2235  DeviceAdapterTag>;
2236 
2237  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
2238  using FetchType1 = typename FetchInfo1::type;
2239  FetchType1 fetch1;
2240  auto p1 =
2241  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
2242 
2243  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
2244  using FetchType2 = typename FetchInfo2::type;
2245  FetchType2 fetch2;
2246  auto p2 =
2247  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
2248 
2249  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
2250  using FetchType3 = typename FetchInfo3::type;
2251  FetchType3 fetch3;
2252  auto p3 =
2253  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
2254 
2255  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
2256  using FetchType4 = typename FetchInfo4::type;
2257  FetchType4 fetch4;
2258  auto p4 =
2259  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
2260 
2261  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
2262  using FetchType5 = typename FetchInfo5::type;
2263  FetchType5 fetch5;
2264  auto p5 =
2265  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
2266 
2267  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
2268  using FetchType6 = typename FetchInfo6::type;
2269  FetchType6 fetch6;
2270  auto p6 =
2271  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
2272 
2273  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
2274  using FetchType7 = typename FetchInfo7::type;
2275  FetchType7 fetch7;
2276  auto p7 =
2277  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
2278 
2279  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
2280  using FetchType8 = typename FetchInfo8::type;
2281  FetchType8 fetch8;
2282  auto p8 =
2283  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
2284 
2285  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
2286  using FetchType9 = typename FetchInfo9::type;
2287  FetchType9 fetch9;
2288  auto p9 =
2289  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
2290 
2291  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
2292  using FetchType10 = typename FetchInfo10::type;
2293  FetchType10 fetch10;
2294  auto p10 =
2295  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
2296 
2297  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
2298  using FetchType11 = typename FetchInfo11::type;
2299  FetchType11 fetch11;
2300  auto p11 =
2301  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
2302 
2303  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
2304  using FetchType12 = typename FetchInfo12::type;
2305  FetchType12 fetch12;
2306  auto p12 =
2307  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
2308 
2309  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
2310  using ReturnFetchType = typename FetchInfo0::type;
2311  ReturnFetchType returnFetch;
2312  // If you got a compile error on the following line, it probably means that
2313  // the operator() of a worklet does not match the definition expected. One
2314  // common problem is that the operator() method must be declared const. Check
2315  // to make sure the "const" keyword is after parameters. Another common
2316  // problem is that the type of one or more parameters is incompatible with
2317  // the actual type that Viskores creates in the execution environment. Make sure
2318  // that the types of the worklet operator() parameters match those in the
2319  // ExecutionSignature. The compiler error might help you narrow down which
2320  // parameter is wrong and the types that did not match.
2321  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
2322 
2323  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
2324  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
2325  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
2326  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
2327  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
2328  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
2329  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
2330  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
2331  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
2332  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
2333  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
2334  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
2335 
2336  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
2337 }
2338 
2339 template <typename WorkletType,
2340  typename ParameterInterface,
2341  typename ControlInterface,
2342  viskores::IdComponent InputDomainIndex,
2343  typename OutputToInputMapType,
2344  typename VisitArrayType,
2345  typename ThreadToOutputMapType,
2346  typename DeviceAdapterTag,
2347  typename ThreadIndicesType,
2348  typename P1,
2349  typename P2,
2350  typename P3,
2351  typename P4,
2352  typename P5,
2353  typename P6,
2354  typename P7,
2355  typename P8,
2356  typename P9,
2357  typename P10,
2358  typename P11,
2359  typename P12>
2360 VISKORES_EXEC void DoWorkletInvokeFunctor(
2361  const WorkletType& worklet,
2362  const viskores::internal::Invocation<ParameterInterface,
2363  ControlInterface,
2364  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)>,
2365  InputDomainIndex,
2366  OutputToInputMapType,
2367  VisitArrayType,
2368  ThreadToOutputMapType,
2369  DeviceAdapterTag>& invocation,
2370  const ThreadIndicesType& threadIndices)
2371 {
2372  using Invocation =
2373  viskores::internal::Invocation<ParameterInterface,
2374  ControlInterface,
2375  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)>,
2376  InputDomainIndex,
2377  OutputToInputMapType,
2378  VisitArrayType,
2379  ThreadToOutputMapType,
2380  DeviceAdapterTag>;
2381 
2382  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
2383  using FetchType1 = typename FetchInfo1::type;
2384  FetchType1 fetch1;
2385  auto p1 =
2386  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
2387 
2388  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
2389  using FetchType2 = typename FetchInfo2::type;
2390  FetchType2 fetch2;
2391  auto p2 =
2392  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
2393 
2394  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
2395  using FetchType3 = typename FetchInfo3::type;
2396  FetchType3 fetch3;
2397  auto p3 =
2398  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
2399 
2400  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
2401  using FetchType4 = typename FetchInfo4::type;
2402  FetchType4 fetch4;
2403  auto p4 =
2404  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
2405 
2406  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
2407  using FetchType5 = typename FetchInfo5::type;
2408  FetchType5 fetch5;
2409  auto p5 =
2410  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
2411 
2412  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
2413  using FetchType6 = typename FetchInfo6::type;
2414  FetchType6 fetch6;
2415  auto p6 =
2416  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
2417 
2418  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
2419  using FetchType7 = typename FetchInfo7::type;
2420  FetchType7 fetch7;
2421  auto p7 =
2422  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
2423 
2424  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
2425  using FetchType8 = typename FetchInfo8::type;
2426  FetchType8 fetch8;
2427  auto p8 =
2428  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
2429 
2430  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
2431  using FetchType9 = typename FetchInfo9::type;
2432  FetchType9 fetch9;
2433  auto p9 =
2434  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
2435 
2436  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
2437  using FetchType10 = typename FetchInfo10::type;
2438  FetchType10 fetch10;
2439  auto p10 =
2440  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
2441 
2442  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
2443  using FetchType11 = typename FetchInfo11::type;
2444  FetchType11 fetch11;
2445  auto p11 =
2446  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
2447 
2448  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
2449  using FetchType12 = typename FetchInfo12::type;
2450  FetchType12 fetch12;
2451  auto p12 =
2452  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
2453 
2454  // If you got a compile error on the following line, it probably means that
2455  // the operator() of a worklet does not match the definition expected. One
2456  // common problem is that the operator() method must be declared const. Check
2457  // to make sure the "const" keyword is after parameters. Another common
2458  // problem is that the type of one or more parameters is incompatible with
2459  // the actual type that Viskores creates in the execution environment. Make sure
2460  // that the types of the worklet operator() parameters match those in the
2461  // ExecutionSignature. The compiler error might help you narrow down which
2462  // parameter is wrong and the types that did not match.
2463  worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
2464 
2465  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
2466  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
2467  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
2468  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
2469  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
2470  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
2471  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
2472  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
2473  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
2474  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
2475  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
2476  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
2477 }
2478 
2479 template <typename WorkletType,
2480  typename ParameterInterface,
2481  typename ControlInterface,
2482  viskores::IdComponent InputDomainIndex,
2483  typename OutputToInputMapType,
2484  typename VisitArrayType,
2485  typename ThreadToOutputMapType,
2486  typename DeviceAdapterTag,
2487  typename ThreadIndicesType,
2488  typename R,
2489  typename P1,
2490  typename P2,
2491  typename P3,
2492  typename P4,
2493  typename P5,
2494  typename P6,
2495  typename P7,
2496  typename P8,
2497  typename P9,
2498  typename P10,
2499  typename P11,
2500  typename P12,
2501  typename P13>
2502 VISKORES_EXEC void DoWorkletInvokeFunctor(
2503  const WorkletType& worklet,
2504  const viskores::internal::Invocation<ParameterInterface,
2505  ControlInterface,
2506  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)>,
2507  InputDomainIndex,
2508  OutputToInputMapType,
2509  VisitArrayType,
2510  ThreadToOutputMapType,
2511  DeviceAdapterTag>& invocation,
2512  const ThreadIndicesType& threadIndices)
2513 {
2514  using Invocation = viskores::internal::Invocation<ParameterInterface,
2515  ControlInterface,
2516  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)>,
2517  InputDomainIndex,
2518  OutputToInputMapType,
2519  VisitArrayType,
2520  ThreadToOutputMapType,
2521  DeviceAdapterTag>;
2522 
2523  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
2524  using FetchType1 = typename FetchInfo1::type;
2525  FetchType1 fetch1;
2526  auto p1 =
2527  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
2528 
2529  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
2530  using FetchType2 = typename FetchInfo2::type;
2531  FetchType2 fetch2;
2532  auto p2 =
2533  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
2534 
2535  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
2536  using FetchType3 = typename FetchInfo3::type;
2537  FetchType3 fetch3;
2538  auto p3 =
2539  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
2540 
2541  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
2542  using FetchType4 = typename FetchInfo4::type;
2543  FetchType4 fetch4;
2544  auto p4 =
2545  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
2546 
2547  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
2548  using FetchType5 = typename FetchInfo5::type;
2549  FetchType5 fetch5;
2550  auto p5 =
2551  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
2552 
2553  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
2554  using FetchType6 = typename FetchInfo6::type;
2555  FetchType6 fetch6;
2556  auto p6 =
2557  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
2558 
2559  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
2560  using FetchType7 = typename FetchInfo7::type;
2561  FetchType7 fetch7;
2562  auto p7 =
2563  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
2564 
2565  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
2566  using FetchType8 = typename FetchInfo8::type;
2567  FetchType8 fetch8;
2568  auto p8 =
2569  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
2570 
2571  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
2572  using FetchType9 = typename FetchInfo9::type;
2573  FetchType9 fetch9;
2574  auto p9 =
2575  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
2576 
2577  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
2578  using FetchType10 = typename FetchInfo10::type;
2579  FetchType10 fetch10;
2580  auto p10 =
2581  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
2582 
2583  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
2584  using FetchType11 = typename FetchInfo11::type;
2585  FetchType11 fetch11;
2586  auto p11 =
2587  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
2588 
2589  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
2590  using FetchType12 = typename FetchInfo12::type;
2591  FetchType12 fetch12;
2592  auto p12 =
2593  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
2594 
2595  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
2596  using FetchType13 = typename FetchInfo13::type;
2597  FetchType13 fetch13;
2598  auto p13 =
2599  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
2600 
2601  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
2602  using ReturnFetchType = typename FetchInfo0::type;
2603  ReturnFetchType returnFetch;
2604  // If you got a compile error on the following line, it probably means that
2605  // the operator() of a worklet does not match the definition expected. One
2606  // common problem is that the operator() method must be declared const. Check
2607  // to make sure the "const" keyword is after parameters. Another common
2608  // problem is that the type of one or more parameters is incompatible with
2609  // the actual type that Viskores creates in the execution environment. Make sure
2610  // that the types of the worklet operator() parameters match those in the
2611  // ExecutionSignature. The compiler error might help you narrow down which
2612  // parameter is wrong and the types that did not match.
2613  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);
2614 
2615  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
2616  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
2617  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
2618  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
2619  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
2620  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
2621  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
2622  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
2623  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
2624  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
2625  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
2626  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
2627  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
2628 
2629  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
2630 }
2631 
2632 template <typename WorkletType,
2633  typename ParameterInterface,
2634  typename ControlInterface,
2635  viskores::IdComponent InputDomainIndex,
2636  typename OutputToInputMapType,
2637  typename VisitArrayType,
2638  typename ThreadToOutputMapType,
2639  typename DeviceAdapterTag,
2640  typename ThreadIndicesType,
2641  typename P1,
2642  typename P2,
2643  typename P3,
2644  typename P4,
2645  typename P5,
2646  typename P6,
2647  typename P7,
2648  typename P8,
2649  typename P9,
2650  typename P10,
2651  typename P11,
2652  typename P12,
2653  typename P13>
2654 VISKORES_EXEC void DoWorkletInvokeFunctor(
2655  const WorkletType& worklet,
2656  const viskores::internal::Invocation<ParameterInterface,
2657  ControlInterface,
2658  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)>,
2659  InputDomainIndex,
2660  OutputToInputMapType,
2661  VisitArrayType,
2662  ThreadToOutputMapType,
2663  DeviceAdapterTag>& invocation,
2664  const ThreadIndicesType& threadIndices)
2665 {
2666  using Invocation =
2667  viskores::internal::Invocation<ParameterInterface,
2668  ControlInterface,
2669  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)>,
2670  InputDomainIndex,
2671  OutputToInputMapType,
2672  VisitArrayType,
2673  ThreadToOutputMapType,
2674  DeviceAdapterTag>;
2675 
2676  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
2677  using FetchType1 = typename FetchInfo1::type;
2678  FetchType1 fetch1;
2679  auto p1 =
2680  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
2681 
2682  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
2683  using FetchType2 = typename FetchInfo2::type;
2684  FetchType2 fetch2;
2685  auto p2 =
2686  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
2687 
2688  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
2689  using FetchType3 = typename FetchInfo3::type;
2690  FetchType3 fetch3;
2691  auto p3 =
2692  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
2693 
2694  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
2695  using FetchType4 = typename FetchInfo4::type;
2696  FetchType4 fetch4;
2697  auto p4 =
2698  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
2699 
2700  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
2701  using FetchType5 = typename FetchInfo5::type;
2702  FetchType5 fetch5;
2703  auto p5 =
2704  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
2705 
2706  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
2707  using FetchType6 = typename FetchInfo6::type;
2708  FetchType6 fetch6;
2709  auto p6 =
2710  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
2711 
2712  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
2713  using FetchType7 = typename FetchInfo7::type;
2714  FetchType7 fetch7;
2715  auto p7 =
2716  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
2717 
2718  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
2719  using FetchType8 = typename FetchInfo8::type;
2720  FetchType8 fetch8;
2721  auto p8 =
2722  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
2723 
2724  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
2725  using FetchType9 = typename FetchInfo9::type;
2726  FetchType9 fetch9;
2727  auto p9 =
2728  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
2729 
2730  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
2731  using FetchType10 = typename FetchInfo10::type;
2732  FetchType10 fetch10;
2733  auto p10 =
2734  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
2735 
2736  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
2737  using FetchType11 = typename FetchInfo11::type;
2738  FetchType11 fetch11;
2739  auto p11 =
2740  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
2741 
2742  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
2743  using FetchType12 = typename FetchInfo12::type;
2744  FetchType12 fetch12;
2745  auto p12 =
2746  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
2747 
2748  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
2749  using FetchType13 = typename FetchInfo13::type;
2750  FetchType13 fetch13;
2751  auto p13 =
2752  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
2753 
2754  // If you got a compile error on the following line, it probably means that
2755  // the operator() of a worklet does not match the definition expected. One
2756  // common problem is that the operator() method must be declared const. Check
2757  // to make sure the "const" keyword is after parameters. Another common
2758  // problem is that the type of one or more parameters is incompatible with
2759  // the actual type that Viskores creates in the execution environment. Make sure
2760  // that the types of the worklet operator() parameters match those in the
2761  // ExecutionSignature. The compiler error might help you narrow down which
2762  // parameter is wrong and the types that did not match.
2763  worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);
2764 
2765  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
2766  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
2767  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
2768  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
2769  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
2770  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
2771  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
2772  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
2773  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
2774  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
2775  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
2776  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
2777  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
2778 }
2779 
2780 template <typename WorkletType,
2781  typename ParameterInterface,
2782  typename ControlInterface,
2783  viskores::IdComponent InputDomainIndex,
2784  typename OutputToInputMapType,
2785  typename VisitArrayType,
2786  typename ThreadToOutputMapType,
2787  typename DeviceAdapterTag,
2788  typename ThreadIndicesType,
2789  typename R,
2790  typename P1,
2791  typename P2,
2792  typename P3,
2793  typename P4,
2794  typename P5,
2795  typename P6,
2796  typename P7,
2797  typename P8,
2798  typename P9,
2799  typename P10,
2800  typename P11,
2801  typename P12,
2802  typename P13,
2803  typename P14>
2804 VISKORES_EXEC void DoWorkletInvokeFunctor(
2805  const WorkletType& worklet,
2806  const viskores::internal::Invocation<ParameterInterface,
2807  ControlInterface,
2808  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)>,
2809  InputDomainIndex,
2810  OutputToInputMapType,
2811  VisitArrayType,
2812  ThreadToOutputMapType,
2813  DeviceAdapterTag>& invocation,
2814  const ThreadIndicesType& threadIndices)
2815 {
2816  using Invocation = viskores::internal::Invocation<ParameterInterface,
2817  ControlInterface,
2818  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)>,
2819  InputDomainIndex,
2820  OutputToInputMapType,
2821  VisitArrayType,
2822  ThreadToOutputMapType,
2823  DeviceAdapterTag>;
2824 
2825  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
2826  using FetchType1 = typename FetchInfo1::type;
2827  FetchType1 fetch1;
2828  auto p1 =
2829  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
2830 
2831  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
2832  using FetchType2 = typename FetchInfo2::type;
2833  FetchType2 fetch2;
2834  auto p2 =
2835  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
2836 
2837  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
2838  using FetchType3 = typename FetchInfo3::type;
2839  FetchType3 fetch3;
2840  auto p3 =
2841  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
2842 
2843  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
2844  using FetchType4 = typename FetchInfo4::type;
2845  FetchType4 fetch4;
2846  auto p4 =
2847  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
2848 
2849  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
2850  using FetchType5 = typename FetchInfo5::type;
2851  FetchType5 fetch5;
2852  auto p5 =
2853  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
2854 
2855  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
2856  using FetchType6 = typename FetchInfo6::type;
2857  FetchType6 fetch6;
2858  auto p6 =
2859  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
2860 
2861  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
2862  using FetchType7 = typename FetchInfo7::type;
2863  FetchType7 fetch7;
2864  auto p7 =
2865  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
2866 
2867  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
2868  using FetchType8 = typename FetchInfo8::type;
2869  FetchType8 fetch8;
2870  auto p8 =
2871  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
2872 
2873  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
2874  using FetchType9 = typename FetchInfo9::type;
2875  FetchType9 fetch9;
2876  auto p9 =
2877  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
2878 
2879  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
2880  using FetchType10 = typename FetchInfo10::type;
2881  FetchType10 fetch10;
2882  auto p10 =
2883  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
2884 
2885  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
2886  using FetchType11 = typename FetchInfo11::type;
2887  FetchType11 fetch11;
2888  auto p11 =
2889  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
2890 
2891  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
2892  using FetchType12 = typename FetchInfo12::type;
2893  FetchType12 fetch12;
2894  auto p12 =
2895  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
2896 
2897  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
2898  using FetchType13 = typename FetchInfo13::type;
2899  FetchType13 fetch13;
2900  auto p13 =
2901  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
2902 
2903  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
2904  using FetchType14 = typename FetchInfo14::type;
2905  FetchType14 fetch14;
2906  auto p14 =
2907  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
2908 
2909  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
2910  using ReturnFetchType = typename FetchInfo0::type;
2911  ReturnFetchType returnFetch;
2912  // If you got a compile error on the following line, it probably means that
2913  // the operator() of a worklet does not match the definition expected. One
2914  // common problem is that the operator() method must be declared const. Check
2915  // to make sure the "const" keyword is after parameters. Another common
2916  // problem is that the type of one or more parameters is incompatible with
2917  // the actual type that Viskores creates in the execution environment. Make sure
2918  // that the types of the worklet operator() parameters match those in the
2919  // ExecutionSignature. The compiler error might help you narrow down which
2920  // parameter is wrong and the types that did not match.
2921  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14);
2922 
2923  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
2924  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
2925  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
2926  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
2927  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
2928  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
2929  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
2930  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
2931  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
2932  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
2933  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
2934  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
2935  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
2936  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
2937 
2938  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
2939 }
2940 
2941 template <typename WorkletType,
2942  typename ParameterInterface,
2943  typename ControlInterface,
2944  viskores::IdComponent InputDomainIndex,
2945  typename OutputToInputMapType,
2946  typename VisitArrayType,
2947  typename ThreadToOutputMapType,
2948  typename DeviceAdapterTag,
2949  typename ThreadIndicesType,
2950  typename P1,
2951  typename P2,
2952  typename P3,
2953  typename P4,
2954  typename P5,
2955  typename P6,
2956  typename P7,
2957  typename P8,
2958  typename P9,
2959  typename P10,
2960  typename P11,
2961  typename P12,
2962  typename P13,
2963  typename P14>
2964 VISKORES_EXEC void DoWorkletInvokeFunctor(
2965  const WorkletType& worklet,
2966  const viskores::internal::Invocation<ParameterInterface,
2967  ControlInterface,
2968  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)>,
2969  InputDomainIndex,
2970  OutputToInputMapType,
2971  VisitArrayType,
2972  ThreadToOutputMapType,
2973  DeviceAdapterTag>& invocation,
2974  const ThreadIndicesType& threadIndices)
2975 {
2976  using Invocation =
2977  viskores::internal::Invocation<ParameterInterface,
2978  ControlInterface,
2979  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)>,
2980  InputDomainIndex,
2981  OutputToInputMapType,
2982  VisitArrayType,
2983  ThreadToOutputMapType,
2984  DeviceAdapterTag>;
2985 
2986  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
2987  using FetchType1 = typename FetchInfo1::type;
2988  FetchType1 fetch1;
2989  auto p1 =
2990  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
2991 
2992  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
2993  using FetchType2 = typename FetchInfo2::type;
2994  FetchType2 fetch2;
2995  auto p2 =
2996  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
2997 
2998  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
2999  using FetchType3 = typename FetchInfo3::type;
3000  FetchType3 fetch3;
3001  auto p3 =
3002  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
3003 
3004  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
3005  using FetchType4 = typename FetchInfo4::type;
3006  FetchType4 fetch4;
3007  auto p4 =
3008  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
3009 
3010  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
3011  using FetchType5 = typename FetchInfo5::type;
3012  FetchType5 fetch5;
3013  auto p5 =
3014  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
3015 
3016  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
3017  using FetchType6 = typename FetchInfo6::type;
3018  FetchType6 fetch6;
3019  auto p6 =
3020  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
3021 
3022  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
3023  using FetchType7 = typename FetchInfo7::type;
3024  FetchType7 fetch7;
3025  auto p7 =
3026  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
3027 
3028  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
3029  using FetchType8 = typename FetchInfo8::type;
3030  FetchType8 fetch8;
3031  auto p8 =
3032  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
3033 
3034  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
3035  using FetchType9 = typename FetchInfo9::type;
3036  FetchType9 fetch9;
3037  auto p9 =
3038  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
3039 
3040  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
3041  using FetchType10 = typename FetchInfo10::type;
3042  FetchType10 fetch10;
3043  auto p10 =
3044  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
3045 
3046  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
3047  using FetchType11 = typename FetchInfo11::type;
3048  FetchType11 fetch11;
3049  auto p11 =
3050  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
3051 
3052  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
3053  using FetchType12 = typename FetchInfo12::type;
3054  FetchType12 fetch12;
3055  auto p12 =
3056  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
3057 
3058  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
3059  using FetchType13 = typename FetchInfo13::type;
3060  FetchType13 fetch13;
3061  auto p13 =
3062  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
3063 
3064  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
3065  using FetchType14 = typename FetchInfo14::type;
3066  FetchType14 fetch14;
3067  auto p14 =
3068  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
3069 
3070  // If you got a compile error on the following line, it probably means that
3071  // the operator() of a worklet does not match the definition expected. One
3072  // common problem is that the operator() method must be declared const. Check
3073  // to make sure the "const" keyword is after parameters. Another common
3074  // problem is that the type of one or more parameters is incompatible with
3075  // the actual type that Viskores creates in the execution environment. Make sure
3076  // that the types of the worklet operator() parameters match those in the
3077  // ExecutionSignature. The compiler error might help you narrow down which
3078  // parameter is wrong and the types that did not match.
3079  worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14);
3080 
3081  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
3082  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
3083  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
3084  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
3085  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
3086  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
3087  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
3088  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
3089  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
3090  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
3091  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
3092  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
3093  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
3094  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
3095 }
3096 
3097 template <typename WorkletType,
3098  typename ParameterInterface,
3099  typename ControlInterface,
3100  viskores::IdComponent InputDomainIndex,
3101  typename OutputToInputMapType,
3102  typename VisitArrayType,
3103  typename ThreadToOutputMapType,
3104  typename DeviceAdapterTag,
3105  typename ThreadIndicesType,
3106  typename R,
3107  typename P1,
3108  typename P2,
3109  typename P3,
3110  typename P4,
3111  typename P5,
3112  typename P6,
3113  typename P7,
3114  typename P8,
3115  typename P9,
3116  typename P10,
3117  typename P11,
3118  typename P12,
3119  typename P13,
3120  typename P14,
3121  typename P15>
3122 VISKORES_EXEC void DoWorkletInvokeFunctor(
3123  const WorkletType& worklet,
3124  const viskores::internal::Invocation<ParameterInterface,
3125  ControlInterface,
3126  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)>,
3127  InputDomainIndex,
3128  OutputToInputMapType,
3129  VisitArrayType,
3130  ThreadToOutputMapType,
3131  DeviceAdapterTag>& invocation,
3132  const ThreadIndicesType& threadIndices)
3133 {
3134  using Invocation = viskores::internal::Invocation<ParameterInterface,
3135  ControlInterface,
3136  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)>,
3137  InputDomainIndex,
3138  OutputToInputMapType,
3139  VisitArrayType,
3140  ThreadToOutputMapType,
3141  DeviceAdapterTag>;
3142 
3143  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
3144  using FetchType1 = typename FetchInfo1::type;
3145  FetchType1 fetch1;
3146  auto p1 =
3147  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
3148 
3149  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
3150  using FetchType2 = typename FetchInfo2::type;
3151  FetchType2 fetch2;
3152  auto p2 =
3153  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
3154 
3155  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
3156  using FetchType3 = typename FetchInfo3::type;
3157  FetchType3 fetch3;
3158  auto p3 =
3159  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
3160 
3161  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
3162  using FetchType4 = typename FetchInfo4::type;
3163  FetchType4 fetch4;
3164  auto p4 =
3165  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
3166 
3167  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
3168  using FetchType5 = typename FetchInfo5::type;
3169  FetchType5 fetch5;
3170  auto p5 =
3171  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
3172 
3173  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
3174  using FetchType6 = typename FetchInfo6::type;
3175  FetchType6 fetch6;
3176  auto p6 =
3177  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
3178 
3179  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
3180  using FetchType7 = typename FetchInfo7::type;
3181  FetchType7 fetch7;
3182  auto p7 =
3183  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
3184 
3185  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
3186  using FetchType8 = typename FetchInfo8::type;
3187  FetchType8 fetch8;
3188  auto p8 =
3189  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
3190 
3191  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
3192  using FetchType9 = typename FetchInfo9::type;
3193  FetchType9 fetch9;
3194  auto p9 =
3195  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
3196 
3197  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
3198  using FetchType10 = typename FetchInfo10::type;
3199  FetchType10 fetch10;
3200  auto p10 =
3201  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
3202 
3203  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
3204  using FetchType11 = typename FetchInfo11::type;
3205  FetchType11 fetch11;
3206  auto p11 =
3207  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
3208 
3209  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
3210  using FetchType12 = typename FetchInfo12::type;
3211  FetchType12 fetch12;
3212  auto p12 =
3213  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
3214 
3215  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
3216  using FetchType13 = typename FetchInfo13::type;
3217  FetchType13 fetch13;
3218  auto p13 =
3219  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
3220 
3221  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
3222  using FetchType14 = typename FetchInfo14::type;
3223  FetchType14 fetch14;
3224  auto p14 =
3225  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
3226 
3227  using FetchInfo15 = InvocationToFetch<ThreadIndicesType, Invocation, 15>;
3228  using FetchType15 = typename FetchInfo15::type;
3229  FetchType15 fetch15;
3230  auto p15 =
3231  fetch15.Load(threadIndices, FetchInfo15::GetParameter(invocation));
3232 
3233  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
3234  using ReturnFetchType = typename FetchInfo0::type;
3235  ReturnFetchType returnFetch;
3236  // If you got a compile error on the following line, it probably means that
3237  // the operator() of a worklet does not match the definition expected. One
3238  // common problem is that the operator() method must be declared const. Check
3239  // to make sure the "const" keyword is after parameters. Another common
3240  // problem is that the type of one or more parameters is incompatible with
3241  // the actual type that Viskores creates in the execution environment. Make sure
3242  // that the types of the worklet operator() parameters match those in the
3243  // ExecutionSignature. The compiler error might help you narrow down which
3244  // parameter is wrong and the types that did not match.
3245  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15);
3246 
3247  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
3248  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
3249  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
3250  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
3251  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
3252  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
3253  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
3254  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
3255  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
3256  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
3257  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
3258  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
3259  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
3260  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
3261  fetch15.Store(threadIndices, FetchInfo15::GetParameter(invocation), p15);
3262 
3263  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
3264 }
3265 
3266 template <typename WorkletType,
3267  typename ParameterInterface,
3268  typename ControlInterface,
3269  viskores::IdComponent InputDomainIndex,
3270  typename OutputToInputMapType,
3271  typename VisitArrayType,
3272  typename ThreadToOutputMapType,
3273  typename DeviceAdapterTag,
3274  typename ThreadIndicesType,
3275  typename P1,
3276  typename P2,
3277  typename P3,
3278  typename P4,
3279  typename P5,
3280  typename P6,
3281  typename P7,
3282  typename P8,
3283  typename P9,
3284  typename P10,
3285  typename P11,
3286  typename P12,
3287  typename P13,
3288  typename P14,
3289  typename P15>
3290 VISKORES_EXEC void DoWorkletInvokeFunctor(
3291  const WorkletType& worklet,
3292  const viskores::internal::Invocation<ParameterInterface,
3293  ControlInterface,
3294  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)>,
3295  InputDomainIndex,
3296  OutputToInputMapType,
3297  VisitArrayType,
3298  ThreadToOutputMapType,
3299  DeviceAdapterTag>& invocation,
3300  const ThreadIndicesType& threadIndices)
3301 {
3302  using Invocation =
3303  viskores::internal::Invocation<ParameterInterface,
3304  ControlInterface,
3305  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)>,
3306  InputDomainIndex,
3307  OutputToInputMapType,
3308  VisitArrayType,
3309  ThreadToOutputMapType,
3310  DeviceAdapterTag>;
3311 
3312  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
3313  using FetchType1 = typename FetchInfo1::type;
3314  FetchType1 fetch1;
3315  auto p1 =
3316  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
3317 
3318  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
3319  using FetchType2 = typename FetchInfo2::type;
3320  FetchType2 fetch2;
3321  auto p2 =
3322  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
3323 
3324  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
3325  using FetchType3 = typename FetchInfo3::type;
3326  FetchType3 fetch3;
3327  auto p3 =
3328  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
3329 
3330  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
3331  using FetchType4 = typename FetchInfo4::type;
3332  FetchType4 fetch4;
3333  auto p4 =
3334  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
3335 
3336  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
3337  using FetchType5 = typename FetchInfo5::type;
3338  FetchType5 fetch5;
3339  auto p5 =
3340  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
3341 
3342  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
3343  using FetchType6 = typename FetchInfo6::type;
3344  FetchType6 fetch6;
3345  auto p6 =
3346  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
3347 
3348  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
3349  using FetchType7 = typename FetchInfo7::type;
3350  FetchType7 fetch7;
3351  auto p7 =
3352  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
3353 
3354  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
3355  using FetchType8 = typename FetchInfo8::type;
3356  FetchType8 fetch8;
3357  auto p8 =
3358  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
3359 
3360  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
3361  using FetchType9 = typename FetchInfo9::type;
3362  FetchType9 fetch9;
3363  auto p9 =
3364  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
3365 
3366  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
3367  using FetchType10 = typename FetchInfo10::type;
3368  FetchType10 fetch10;
3369  auto p10 =
3370  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
3371 
3372  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
3373  using FetchType11 = typename FetchInfo11::type;
3374  FetchType11 fetch11;
3375  auto p11 =
3376  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
3377 
3378  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
3379  using FetchType12 = typename FetchInfo12::type;
3380  FetchType12 fetch12;
3381  auto p12 =
3382  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
3383 
3384  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
3385  using FetchType13 = typename FetchInfo13::type;
3386  FetchType13 fetch13;
3387  auto p13 =
3388  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
3389 
3390  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
3391  using FetchType14 = typename FetchInfo14::type;
3392  FetchType14 fetch14;
3393  auto p14 =
3394  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
3395 
3396  using FetchInfo15 = InvocationToFetch<ThreadIndicesType, Invocation, 15>;
3397  using FetchType15 = typename FetchInfo15::type;
3398  FetchType15 fetch15;
3399  auto p15 =
3400  fetch15.Load(threadIndices, FetchInfo15::GetParameter(invocation));
3401 
3402  // If you got a compile error on the following line, it probably means that
3403  // the operator() of a worklet does not match the definition expected. One
3404  // common problem is that the operator() method must be declared const. Check
3405  // to make sure the "const" keyword is after parameters. Another common
3406  // problem is that the type of one or more parameters is incompatible with
3407  // the actual type that Viskores creates in the execution environment. Make sure
3408  // that the types of the worklet operator() parameters match those in the
3409  // ExecutionSignature. The compiler error might help you narrow down which
3410  // parameter is wrong and the types that did not match.
3411  worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15);
3412 
3413  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
3414  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
3415  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
3416  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
3417  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
3418  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
3419  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
3420  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
3421  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
3422  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
3423  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
3424  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
3425  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
3426  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
3427  fetch15.Store(threadIndices, FetchInfo15::GetParameter(invocation), p15);
3428 }
3429 
3430 template <typename WorkletType,
3431  typename ParameterInterface,
3432  typename ControlInterface,
3433  viskores::IdComponent InputDomainIndex,
3434  typename OutputToInputMapType,
3435  typename VisitArrayType,
3436  typename ThreadToOutputMapType,
3437  typename DeviceAdapterTag,
3438  typename ThreadIndicesType,
3439  typename R,
3440  typename P1,
3441  typename P2,
3442  typename P3,
3443  typename P4,
3444  typename P5,
3445  typename P6,
3446  typename P7,
3447  typename P8,
3448  typename P9,
3449  typename P10,
3450  typename P11,
3451  typename P12,
3452  typename P13,
3453  typename P14,
3454  typename P15,
3455  typename P16>
3456 VISKORES_EXEC void DoWorkletInvokeFunctor(
3457  const WorkletType& worklet,
3458  const viskores::internal::Invocation<ParameterInterface,
3459  ControlInterface,
3460  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16)>,
3461  InputDomainIndex,
3462  OutputToInputMapType,
3463  VisitArrayType,
3464  ThreadToOutputMapType,
3465  DeviceAdapterTag>& invocation,
3466  const ThreadIndicesType& threadIndices)
3467 {
3468  using Invocation = viskores::internal::Invocation<ParameterInterface,
3469  ControlInterface,
3470  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16)>,
3471  InputDomainIndex,
3472  OutputToInputMapType,
3473  VisitArrayType,
3474  ThreadToOutputMapType,
3475  DeviceAdapterTag>;
3476 
3477  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
3478  using FetchType1 = typename FetchInfo1::type;
3479  FetchType1 fetch1;
3480  auto p1 =
3481  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
3482 
3483  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
3484  using FetchType2 = typename FetchInfo2::type;
3485  FetchType2 fetch2;
3486  auto p2 =
3487  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
3488 
3489  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
3490  using FetchType3 = typename FetchInfo3::type;
3491  FetchType3 fetch3;
3492  auto p3 =
3493  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
3494 
3495  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
3496  using FetchType4 = typename FetchInfo4::type;
3497  FetchType4 fetch4;
3498  auto p4 =
3499  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
3500 
3501  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
3502  using FetchType5 = typename FetchInfo5::type;
3503  FetchType5 fetch5;
3504  auto p5 =
3505  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
3506 
3507  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
3508  using FetchType6 = typename FetchInfo6::type;
3509  FetchType6 fetch6;
3510  auto p6 =
3511  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
3512 
3513  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
3514  using FetchType7 = typename FetchInfo7::type;
3515  FetchType7 fetch7;
3516  auto p7 =
3517  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
3518 
3519  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
3520  using FetchType8 = typename FetchInfo8::type;
3521  FetchType8 fetch8;
3522  auto p8 =
3523  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
3524 
3525  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
3526  using FetchType9 = typename FetchInfo9::type;
3527  FetchType9 fetch9;
3528  auto p9 =
3529  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
3530 
3531  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
3532  using FetchType10 = typename FetchInfo10::type;
3533  FetchType10 fetch10;
3534  auto p10 =
3535  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
3536 
3537  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
3538  using FetchType11 = typename FetchInfo11::type;
3539  FetchType11 fetch11;
3540  auto p11 =
3541  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
3542 
3543  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
3544  using FetchType12 = typename FetchInfo12::type;
3545  FetchType12 fetch12;
3546  auto p12 =
3547  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
3548 
3549  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
3550  using FetchType13 = typename FetchInfo13::type;
3551  FetchType13 fetch13;
3552  auto p13 =
3553  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
3554 
3555  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
3556  using FetchType14 = typename FetchInfo14::type;
3557  FetchType14 fetch14;
3558  auto p14 =
3559  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
3560 
3561  using FetchInfo15 = InvocationToFetch<ThreadIndicesType, Invocation, 15>;
3562  using FetchType15 = typename FetchInfo15::type;
3563  FetchType15 fetch15;
3564  auto p15 =
3565  fetch15.Load(threadIndices, FetchInfo15::GetParameter(invocation));
3566 
3567  using FetchInfo16 = InvocationToFetch<ThreadIndicesType, Invocation, 16>;
3568  using FetchType16 = typename FetchInfo16::type;
3569  FetchType16 fetch16;
3570  auto p16 =
3571  fetch16.Load(threadIndices, FetchInfo16::GetParameter(invocation));
3572 
3573  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
3574  using ReturnFetchType = typename FetchInfo0::type;
3575  ReturnFetchType returnFetch;
3576  // If you got a compile error on the following line, it probably means that
3577  // the operator() of a worklet does not match the definition expected. One
3578  // common problem is that the operator() method must be declared const. Check
3579  // to make sure the "const" keyword is after parameters. Another common
3580  // problem is that the type of one or more parameters is incompatible with
3581  // the actual type that Viskores creates in the execution environment. Make sure
3582  // that the types of the worklet operator() parameters match those in the
3583  // ExecutionSignature. The compiler error might help you narrow down which
3584  // parameter is wrong and the types that did not match.
3585  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16);
3586 
3587  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
3588  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
3589  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
3590  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
3591  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
3592  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
3593  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
3594  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
3595  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
3596  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
3597  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
3598  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
3599  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
3600  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
3601  fetch15.Store(threadIndices, FetchInfo15::GetParameter(invocation), p15);
3602  fetch16.Store(threadIndices, FetchInfo16::GetParameter(invocation), p16);
3603 
3604  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
3605 }
3606 
3607 template <typename WorkletType,
3608  typename ParameterInterface,
3609  typename ControlInterface,
3610  viskores::IdComponent InputDomainIndex,
3611  typename OutputToInputMapType,
3612  typename VisitArrayType,
3613  typename ThreadToOutputMapType,
3614  typename DeviceAdapterTag,
3615  typename ThreadIndicesType,
3616  typename P1,
3617  typename P2,
3618  typename P3,
3619  typename P4,
3620  typename P5,
3621  typename P6,
3622  typename P7,
3623  typename P8,
3624  typename P9,
3625  typename P10,
3626  typename P11,
3627  typename P12,
3628  typename P13,
3629  typename P14,
3630  typename P15,
3631  typename P16>
3632 VISKORES_EXEC void DoWorkletInvokeFunctor(
3633  const WorkletType& worklet,
3634  const viskores::internal::Invocation<ParameterInterface,
3635  ControlInterface,
3636  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16)>,
3637  InputDomainIndex,
3638  OutputToInputMapType,
3639  VisitArrayType,
3640  ThreadToOutputMapType,
3641  DeviceAdapterTag>& invocation,
3642  const ThreadIndicesType& threadIndices)
3643 {
3644  using Invocation =
3645  viskores::internal::Invocation<ParameterInterface,
3646  ControlInterface,
3647  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16)>,
3648  InputDomainIndex,
3649  OutputToInputMapType,
3650  VisitArrayType,
3651  ThreadToOutputMapType,
3652  DeviceAdapterTag>;
3653 
3654  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
3655  using FetchType1 = typename FetchInfo1::type;
3656  FetchType1 fetch1;
3657  auto p1 =
3658  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
3659 
3660  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
3661  using FetchType2 = typename FetchInfo2::type;
3662  FetchType2 fetch2;
3663  auto p2 =
3664  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
3665 
3666  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
3667  using FetchType3 = typename FetchInfo3::type;
3668  FetchType3 fetch3;
3669  auto p3 =
3670  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
3671 
3672  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
3673  using FetchType4 = typename FetchInfo4::type;
3674  FetchType4 fetch4;
3675  auto p4 =
3676  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
3677 
3678  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
3679  using FetchType5 = typename FetchInfo5::type;
3680  FetchType5 fetch5;
3681  auto p5 =
3682  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
3683 
3684  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
3685  using FetchType6 = typename FetchInfo6::type;
3686  FetchType6 fetch6;
3687  auto p6 =
3688  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
3689 
3690  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
3691  using FetchType7 = typename FetchInfo7::type;
3692  FetchType7 fetch7;
3693  auto p7 =
3694  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
3695 
3696  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
3697  using FetchType8 = typename FetchInfo8::type;
3698  FetchType8 fetch8;
3699  auto p8 =
3700  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
3701 
3702  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
3703  using FetchType9 = typename FetchInfo9::type;
3704  FetchType9 fetch9;
3705  auto p9 =
3706  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
3707 
3708  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
3709  using FetchType10 = typename FetchInfo10::type;
3710  FetchType10 fetch10;
3711  auto p10 =
3712  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
3713 
3714  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
3715  using FetchType11 = typename FetchInfo11::type;
3716  FetchType11 fetch11;
3717  auto p11 =
3718  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
3719 
3720  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
3721  using FetchType12 = typename FetchInfo12::type;
3722  FetchType12 fetch12;
3723  auto p12 =
3724  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
3725 
3726  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
3727  using FetchType13 = typename FetchInfo13::type;
3728  FetchType13 fetch13;
3729  auto p13 =
3730  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
3731 
3732  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
3733  using FetchType14 = typename FetchInfo14::type;
3734  FetchType14 fetch14;
3735  auto p14 =
3736  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
3737 
3738  using FetchInfo15 = InvocationToFetch<ThreadIndicesType, Invocation, 15>;
3739  using FetchType15 = typename FetchInfo15::type;
3740  FetchType15 fetch15;
3741  auto p15 =
3742  fetch15.Load(threadIndices, FetchInfo15::GetParameter(invocation));
3743 
3744  using FetchInfo16 = InvocationToFetch<ThreadIndicesType, Invocation, 16>;
3745  using FetchType16 = typename FetchInfo16::type;
3746  FetchType16 fetch16;
3747  auto p16 =
3748  fetch16.Load(threadIndices, FetchInfo16::GetParameter(invocation));
3749 
3750  // If you got a compile error on the following line, it probably means that
3751  // the operator() of a worklet does not match the definition expected. One
3752  // common problem is that the operator() method must be declared const. Check
3753  // to make sure the "const" keyword is after parameters. Another common
3754  // problem is that the type of one or more parameters is incompatible with
3755  // the actual type that Viskores creates in the execution environment. Make sure
3756  // that the types of the worklet operator() parameters match those in the
3757  // ExecutionSignature. The compiler error might help you narrow down which
3758  // parameter is wrong and the types that did not match.
3759  worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16);
3760 
3761  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
3762  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
3763  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
3764  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
3765  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
3766  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
3767  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
3768  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
3769  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
3770  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
3771  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
3772  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
3773  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
3774  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
3775  fetch15.Store(threadIndices, FetchInfo15::GetParameter(invocation), p15);
3776  fetch16.Store(threadIndices, FetchInfo16::GetParameter(invocation), p16);
3777 }
3778 
3779 template <typename WorkletType,
3780  typename ParameterInterface,
3781  typename ControlInterface,
3782  viskores::IdComponent InputDomainIndex,
3783  typename OutputToInputMapType,
3784  typename VisitArrayType,
3785  typename ThreadToOutputMapType,
3786  typename DeviceAdapterTag,
3787  typename ThreadIndicesType,
3788  typename R,
3789  typename P1,
3790  typename P2,
3791  typename P3,
3792  typename P4,
3793  typename P5,
3794  typename P6,
3795  typename P7,
3796  typename P8,
3797  typename P9,
3798  typename P10,
3799  typename P11,
3800  typename P12,
3801  typename P13,
3802  typename P14,
3803  typename P15,
3804  typename P16,
3805  typename P17>
3806 VISKORES_EXEC void DoWorkletInvokeFunctor(
3807  const WorkletType& worklet,
3808  const viskores::internal::Invocation<ParameterInterface,
3809  ControlInterface,
3810  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17)>,
3811  InputDomainIndex,
3812  OutputToInputMapType,
3813  VisitArrayType,
3814  ThreadToOutputMapType,
3815  DeviceAdapterTag>& invocation,
3816  const ThreadIndicesType& threadIndices)
3817 {
3818  using Invocation = viskores::internal::Invocation<ParameterInterface,
3819  ControlInterface,
3820  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17)>,
3821  InputDomainIndex,
3822  OutputToInputMapType,
3823  VisitArrayType,
3824  ThreadToOutputMapType,
3825  DeviceAdapterTag>;
3826 
3827  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
3828  using FetchType1 = typename FetchInfo1::type;
3829  FetchType1 fetch1;
3830  auto p1 =
3831  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
3832 
3833  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
3834  using FetchType2 = typename FetchInfo2::type;
3835  FetchType2 fetch2;
3836  auto p2 =
3837  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
3838 
3839  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
3840  using FetchType3 = typename FetchInfo3::type;
3841  FetchType3 fetch3;
3842  auto p3 =
3843  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
3844 
3845  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
3846  using FetchType4 = typename FetchInfo4::type;
3847  FetchType4 fetch4;
3848  auto p4 =
3849  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
3850 
3851  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
3852  using FetchType5 = typename FetchInfo5::type;
3853  FetchType5 fetch5;
3854  auto p5 =
3855  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
3856 
3857  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
3858  using FetchType6 = typename FetchInfo6::type;
3859  FetchType6 fetch6;
3860  auto p6 =
3861  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
3862 
3863  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
3864  using FetchType7 = typename FetchInfo7::type;
3865  FetchType7 fetch7;
3866  auto p7 =
3867  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
3868 
3869  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
3870  using FetchType8 = typename FetchInfo8::type;
3871  FetchType8 fetch8;
3872  auto p8 =
3873  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
3874 
3875  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
3876  using FetchType9 = typename FetchInfo9::type;
3877  FetchType9 fetch9;
3878  auto p9 =
3879  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
3880 
3881  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
3882  using FetchType10 = typename FetchInfo10::type;
3883  FetchType10 fetch10;
3884  auto p10 =
3885  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
3886 
3887  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
3888  using FetchType11 = typename FetchInfo11::type;
3889  FetchType11 fetch11;
3890  auto p11 =
3891  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
3892 
3893  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
3894  using FetchType12 = typename FetchInfo12::type;
3895  FetchType12 fetch12;
3896  auto p12 =
3897  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
3898 
3899  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
3900  using FetchType13 = typename FetchInfo13::type;
3901  FetchType13 fetch13;
3902  auto p13 =
3903  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
3904 
3905  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
3906  using FetchType14 = typename FetchInfo14::type;
3907  FetchType14 fetch14;
3908  auto p14 =
3909  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
3910 
3911  using FetchInfo15 = InvocationToFetch<ThreadIndicesType, Invocation, 15>;
3912  using FetchType15 = typename FetchInfo15::type;
3913  FetchType15 fetch15;
3914  auto p15 =
3915  fetch15.Load(threadIndices, FetchInfo15::GetParameter(invocation));
3916 
3917  using FetchInfo16 = InvocationToFetch<ThreadIndicesType, Invocation, 16>;
3918  using FetchType16 = typename FetchInfo16::type;
3919  FetchType16 fetch16;
3920  auto p16 =
3921  fetch16.Load(threadIndices, FetchInfo16::GetParameter(invocation));
3922 
3923  using FetchInfo17 = InvocationToFetch<ThreadIndicesType, Invocation, 17>;
3924  using FetchType17 = typename FetchInfo17::type;
3925  FetchType17 fetch17;
3926  auto p17 =
3927  fetch17.Load(threadIndices, FetchInfo17::GetParameter(invocation));
3928 
3929  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
3930  using ReturnFetchType = typename FetchInfo0::type;
3931  ReturnFetchType returnFetch;
3932  // If you got a compile error on the following line, it probably means that
3933  // the operator() of a worklet does not match the definition expected. One
3934  // common problem is that the operator() method must be declared const. Check
3935  // to make sure the "const" keyword is after parameters. Another common
3936  // problem is that the type of one or more parameters is incompatible with
3937  // the actual type that Viskores creates in the execution environment. Make sure
3938  // that the types of the worklet operator() parameters match those in the
3939  // ExecutionSignature. The compiler error might help you narrow down which
3940  // parameter is wrong and the types that did not match.
3941  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17);
3942 
3943  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
3944  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
3945  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
3946  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
3947  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
3948  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
3949  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
3950  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
3951  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
3952  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
3953  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
3954  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
3955  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
3956  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
3957  fetch15.Store(threadIndices, FetchInfo15::GetParameter(invocation), p15);
3958  fetch16.Store(threadIndices, FetchInfo16::GetParameter(invocation), p16);
3959  fetch17.Store(threadIndices, FetchInfo17::GetParameter(invocation), p17);
3960 
3961  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
3962 }
3963 
3964 template <typename WorkletType,
3965  typename ParameterInterface,
3966  typename ControlInterface,
3967  viskores::IdComponent InputDomainIndex,
3968  typename OutputToInputMapType,
3969  typename VisitArrayType,
3970  typename ThreadToOutputMapType,
3971  typename DeviceAdapterTag,
3972  typename ThreadIndicesType,
3973  typename P1,
3974  typename P2,
3975  typename P3,
3976  typename P4,
3977  typename P5,
3978  typename P6,
3979  typename P7,
3980  typename P8,
3981  typename P9,
3982  typename P10,
3983  typename P11,
3984  typename P12,
3985  typename P13,
3986  typename P14,
3987  typename P15,
3988  typename P16,
3989  typename P17>
3990 VISKORES_EXEC void DoWorkletInvokeFunctor(
3991  const WorkletType& worklet,
3992  const viskores::internal::Invocation<ParameterInterface,
3993  ControlInterface,
3994  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17)>,
3995  InputDomainIndex,
3996  OutputToInputMapType,
3997  VisitArrayType,
3998  ThreadToOutputMapType,
3999  DeviceAdapterTag>& invocation,
4000  const ThreadIndicesType& threadIndices)
4001 {
4002  using Invocation =
4003  viskores::internal::Invocation<ParameterInterface,
4004  ControlInterface,
4005  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17)>,
4006  InputDomainIndex,
4007  OutputToInputMapType,
4008  VisitArrayType,
4009  ThreadToOutputMapType,
4010  DeviceAdapterTag>;
4011 
4012  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
4013  using FetchType1 = typename FetchInfo1::type;
4014  FetchType1 fetch1;
4015  auto p1 =
4016  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
4017 
4018  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
4019  using FetchType2 = typename FetchInfo2::type;
4020  FetchType2 fetch2;
4021  auto p2 =
4022  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
4023 
4024  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
4025  using FetchType3 = typename FetchInfo3::type;
4026  FetchType3 fetch3;
4027  auto p3 =
4028  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
4029 
4030  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
4031  using FetchType4 = typename FetchInfo4::type;
4032  FetchType4 fetch4;
4033  auto p4 =
4034  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
4035 
4036  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
4037  using FetchType5 = typename FetchInfo5::type;
4038  FetchType5 fetch5;
4039  auto p5 =
4040  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
4041 
4042  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
4043  using FetchType6 = typename FetchInfo6::type;
4044  FetchType6 fetch6;
4045  auto p6 =
4046  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
4047 
4048  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
4049  using FetchType7 = typename FetchInfo7::type;
4050  FetchType7 fetch7;
4051  auto p7 =
4052  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
4053 
4054  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
4055  using FetchType8 = typename FetchInfo8::type;
4056  FetchType8 fetch8;
4057  auto p8 =
4058  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
4059 
4060  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
4061  using FetchType9 = typename FetchInfo9::type;
4062  FetchType9 fetch9;
4063  auto p9 =
4064  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
4065 
4066  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
4067  using FetchType10 = typename FetchInfo10::type;
4068  FetchType10 fetch10;
4069  auto p10 =
4070  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
4071 
4072  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
4073  using FetchType11 = typename FetchInfo11::type;
4074  FetchType11 fetch11;
4075  auto p11 =
4076  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
4077 
4078  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
4079  using FetchType12 = typename FetchInfo12::type;
4080  FetchType12 fetch12;
4081  auto p12 =
4082  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
4083 
4084  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
4085  using FetchType13 = typename FetchInfo13::type;
4086  FetchType13 fetch13;
4087  auto p13 =
4088  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
4089 
4090  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
4091  using FetchType14 = typename FetchInfo14::type;
4092  FetchType14 fetch14;
4093  auto p14 =
4094  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
4095 
4096  using FetchInfo15 = InvocationToFetch<ThreadIndicesType, Invocation, 15>;
4097  using FetchType15 = typename FetchInfo15::type;
4098  FetchType15 fetch15;
4099  auto p15 =
4100  fetch15.Load(threadIndices, FetchInfo15::GetParameter(invocation));
4101 
4102  using FetchInfo16 = InvocationToFetch<ThreadIndicesType, Invocation, 16>;
4103  using FetchType16 = typename FetchInfo16::type;
4104  FetchType16 fetch16;
4105  auto p16 =
4106  fetch16.Load(threadIndices, FetchInfo16::GetParameter(invocation));
4107 
4108  using FetchInfo17 = InvocationToFetch<ThreadIndicesType, Invocation, 17>;
4109  using FetchType17 = typename FetchInfo17::type;
4110  FetchType17 fetch17;
4111  auto p17 =
4112  fetch17.Load(threadIndices, FetchInfo17::GetParameter(invocation));
4113 
4114  // If you got a compile error on the following line, it probably means that
4115  // the operator() of a worklet does not match the definition expected. One
4116  // common problem is that the operator() method must be declared const. Check
4117  // to make sure the "const" keyword is after parameters. Another common
4118  // problem is that the type of one or more parameters is incompatible with
4119  // the actual type that Viskores creates in the execution environment. Make sure
4120  // that the types of the worklet operator() parameters match those in the
4121  // ExecutionSignature. The compiler error might help you narrow down which
4122  // parameter is wrong and the types that did not match.
4123  worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17);
4124 
4125  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
4126  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
4127  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
4128  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
4129  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
4130  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
4131  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
4132  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
4133  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
4134  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
4135  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
4136  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
4137  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
4138  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
4139  fetch15.Store(threadIndices, FetchInfo15::GetParameter(invocation), p15);
4140  fetch16.Store(threadIndices, FetchInfo16::GetParameter(invocation), p16);
4141  fetch17.Store(threadIndices, FetchInfo17::GetParameter(invocation), p17);
4142 }
4143 
4144 template <typename WorkletType,
4145  typename ParameterInterface,
4146  typename ControlInterface,
4147  viskores::IdComponent InputDomainIndex,
4148  typename OutputToInputMapType,
4149  typename VisitArrayType,
4150  typename ThreadToOutputMapType,
4151  typename DeviceAdapterTag,
4152  typename ThreadIndicesType,
4153  typename R,
4154  typename P1,
4155  typename P2,
4156  typename P3,
4157  typename P4,
4158  typename P5,
4159  typename P6,
4160  typename P7,
4161  typename P8,
4162  typename P9,
4163  typename P10,
4164  typename P11,
4165  typename P12,
4166  typename P13,
4167  typename P14,
4168  typename P15,
4169  typename P16,
4170  typename P17,
4171  typename P18>
4172 VISKORES_EXEC void DoWorkletInvokeFunctor(
4173  const WorkletType& worklet,
4174  const viskores::internal::Invocation<ParameterInterface,
4175  ControlInterface,
4176  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18)>,
4177  InputDomainIndex,
4178  OutputToInputMapType,
4179  VisitArrayType,
4180  ThreadToOutputMapType,
4181  DeviceAdapterTag>& invocation,
4182  const ThreadIndicesType& threadIndices)
4183 {
4184  using Invocation = viskores::internal::Invocation<ParameterInterface,
4185  ControlInterface,
4186  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18)>,
4187  InputDomainIndex,
4188  OutputToInputMapType,
4189  VisitArrayType,
4190  ThreadToOutputMapType,
4191  DeviceAdapterTag>;
4192 
4193  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
4194  using FetchType1 = typename FetchInfo1::type;
4195  FetchType1 fetch1;
4196  auto p1 =
4197  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
4198 
4199  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
4200  using FetchType2 = typename FetchInfo2::type;
4201  FetchType2 fetch2;
4202  auto p2 =
4203  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
4204 
4205  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
4206  using FetchType3 = typename FetchInfo3::type;
4207  FetchType3 fetch3;
4208  auto p3 =
4209  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
4210 
4211  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
4212  using FetchType4 = typename FetchInfo4::type;
4213  FetchType4 fetch4;
4214  auto p4 =
4215  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
4216 
4217  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
4218  using FetchType5 = typename FetchInfo5::type;
4219  FetchType5 fetch5;
4220  auto p5 =
4221  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
4222 
4223  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
4224  using FetchType6 = typename FetchInfo6::type;
4225  FetchType6 fetch6;
4226  auto p6 =
4227  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
4228 
4229  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
4230  using FetchType7 = typename FetchInfo7::type;
4231  FetchType7 fetch7;
4232  auto p7 =
4233  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
4234 
4235  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
4236  using FetchType8 = typename FetchInfo8::type;
4237  FetchType8 fetch8;
4238  auto p8 =
4239  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
4240 
4241  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
4242  using FetchType9 = typename FetchInfo9::type;
4243  FetchType9 fetch9;
4244  auto p9 =
4245  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
4246 
4247  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
4248  using FetchType10 = typename FetchInfo10::type;
4249  FetchType10 fetch10;
4250  auto p10 =
4251  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
4252 
4253  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
4254  using FetchType11 = typename FetchInfo11::type;
4255  FetchType11 fetch11;
4256  auto p11 =
4257  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
4258 
4259  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
4260  using FetchType12 = typename FetchInfo12::type;
4261  FetchType12 fetch12;
4262  auto p12 =
4263  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
4264 
4265  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
4266  using FetchType13 = typename FetchInfo13::type;
4267  FetchType13 fetch13;
4268  auto p13 =
4269  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
4270 
4271  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
4272  using FetchType14 = typename FetchInfo14::type;
4273  FetchType14 fetch14;
4274  auto p14 =
4275  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
4276 
4277  using FetchInfo15 = InvocationToFetch<ThreadIndicesType, Invocation, 15>;
4278  using FetchType15 = typename FetchInfo15::type;
4279  FetchType15 fetch15;
4280  auto p15 =
4281  fetch15.Load(threadIndices, FetchInfo15::GetParameter(invocation));
4282 
4283  using FetchInfo16 = InvocationToFetch<ThreadIndicesType, Invocation, 16>;
4284  using FetchType16 = typename FetchInfo16::type;
4285  FetchType16 fetch16;
4286  auto p16 =
4287  fetch16.Load(threadIndices, FetchInfo16::GetParameter(invocation));
4288 
4289  using FetchInfo17 = InvocationToFetch<ThreadIndicesType, Invocation, 17>;
4290  using FetchType17 = typename FetchInfo17::type;
4291  FetchType17 fetch17;
4292  auto p17 =
4293  fetch17.Load(threadIndices, FetchInfo17::GetParameter(invocation));
4294 
4295  using FetchInfo18 = InvocationToFetch<ThreadIndicesType, Invocation, 18>;
4296  using FetchType18 = typename FetchInfo18::type;
4297  FetchType18 fetch18;
4298  auto p18 =
4299  fetch18.Load(threadIndices, FetchInfo18::GetParameter(invocation));
4300 
4301  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
4302  using ReturnFetchType = typename FetchInfo0::type;
4303  ReturnFetchType returnFetch;
4304  // If you got a compile error on the following line, it probably means that
4305  // the operator() of a worklet does not match the definition expected. One
4306  // common problem is that the operator() method must be declared const. Check
4307  // to make sure the "const" keyword is after parameters. Another common
4308  // problem is that the type of one or more parameters is incompatible with
4309  // the actual type that Viskores creates in the execution environment. Make sure
4310  // that the types of the worklet operator() parameters match those in the
4311  // ExecutionSignature. The compiler error might help you narrow down which
4312  // parameter is wrong and the types that did not match.
4313  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18);
4314 
4315  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
4316  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
4317  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
4318  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
4319  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
4320  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
4321  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
4322  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
4323  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
4324  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
4325  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
4326  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
4327  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
4328  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
4329  fetch15.Store(threadIndices, FetchInfo15::GetParameter(invocation), p15);
4330  fetch16.Store(threadIndices, FetchInfo16::GetParameter(invocation), p16);
4331  fetch17.Store(threadIndices, FetchInfo17::GetParameter(invocation), p17);
4332  fetch18.Store(threadIndices, FetchInfo18::GetParameter(invocation), p18);
4333 
4334  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
4335 }
4336 
4337 template <typename WorkletType,
4338  typename ParameterInterface,
4339  typename ControlInterface,
4340  viskores::IdComponent InputDomainIndex,
4341  typename OutputToInputMapType,
4342  typename VisitArrayType,
4343  typename ThreadToOutputMapType,
4344  typename DeviceAdapterTag,
4345  typename ThreadIndicesType,
4346  typename P1,
4347  typename P2,
4348  typename P3,
4349  typename P4,
4350  typename P5,
4351  typename P6,
4352  typename P7,
4353  typename P8,
4354  typename P9,
4355  typename P10,
4356  typename P11,
4357  typename P12,
4358  typename P13,
4359  typename P14,
4360  typename P15,
4361  typename P16,
4362  typename P17,
4363  typename P18>
4364 VISKORES_EXEC void DoWorkletInvokeFunctor(
4365  const WorkletType& worklet,
4366  const viskores::internal::Invocation<ParameterInterface,
4367  ControlInterface,
4368  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18)>,
4369  InputDomainIndex,
4370  OutputToInputMapType,
4371  VisitArrayType,
4372  ThreadToOutputMapType,
4373  DeviceAdapterTag>& invocation,
4374  const ThreadIndicesType& threadIndices)
4375 {
4376  using Invocation =
4377  viskores::internal::Invocation<ParameterInterface,
4378  ControlInterface,
4379  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18)>,
4380  InputDomainIndex,
4381  OutputToInputMapType,
4382  VisitArrayType,
4383  ThreadToOutputMapType,
4384  DeviceAdapterTag>;
4385 
4386  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
4387  using FetchType1 = typename FetchInfo1::type;
4388  FetchType1 fetch1;
4389  auto p1 =
4390  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
4391 
4392  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
4393  using FetchType2 = typename FetchInfo2::type;
4394  FetchType2 fetch2;
4395  auto p2 =
4396  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
4397 
4398  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
4399  using FetchType3 = typename FetchInfo3::type;
4400  FetchType3 fetch3;
4401  auto p3 =
4402  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
4403 
4404  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
4405  using FetchType4 = typename FetchInfo4::type;
4406  FetchType4 fetch4;
4407  auto p4 =
4408  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
4409 
4410  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
4411  using FetchType5 = typename FetchInfo5::type;
4412  FetchType5 fetch5;
4413  auto p5 =
4414  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
4415 
4416  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
4417  using FetchType6 = typename FetchInfo6::type;
4418  FetchType6 fetch6;
4419  auto p6 =
4420  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
4421 
4422  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
4423  using FetchType7 = typename FetchInfo7::type;
4424  FetchType7 fetch7;
4425  auto p7 =
4426  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
4427 
4428  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
4429  using FetchType8 = typename FetchInfo8::type;
4430  FetchType8 fetch8;
4431  auto p8 =
4432  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
4433 
4434  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
4435  using FetchType9 = typename FetchInfo9::type;
4436  FetchType9 fetch9;
4437  auto p9 =
4438  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
4439 
4440  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
4441  using FetchType10 = typename FetchInfo10::type;
4442  FetchType10 fetch10;
4443  auto p10 =
4444  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
4445 
4446  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
4447  using FetchType11 = typename FetchInfo11::type;
4448  FetchType11 fetch11;
4449  auto p11 =
4450  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
4451 
4452  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
4453  using FetchType12 = typename FetchInfo12::type;
4454  FetchType12 fetch12;
4455  auto p12 =
4456  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
4457 
4458  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
4459  using FetchType13 = typename FetchInfo13::type;
4460  FetchType13 fetch13;
4461  auto p13 =
4462  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
4463 
4464  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
4465  using FetchType14 = typename FetchInfo14::type;
4466  FetchType14 fetch14;
4467  auto p14 =
4468  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
4469 
4470  using FetchInfo15 = InvocationToFetch<ThreadIndicesType, Invocation, 15>;
4471  using FetchType15 = typename FetchInfo15::type;
4472  FetchType15 fetch15;
4473  auto p15 =
4474  fetch15.Load(threadIndices, FetchInfo15::GetParameter(invocation));
4475 
4476  using FetchInfo16 = InvocationToFetch<ThreadIndicesType, Invocation, 16>;
4477  using FetchType16 = typename FetchInfo16::type;
4478  FetchType16 fetch16;
4479  auto p16 =
4480  fetch16.Load(threadIndices, FetchInfo16::GetParameter(invocation));
4481 
4482  using FetchInfo17 = InvocationToFetch<ThreadIndicesType, Invocation, 17>;
4483  using FetchType17 = typename FetchInfo17::type;
4484  FetchType17 fetch17;
4485  auto p17 =
4486  fetch17.Load(threadIndices, FetchInfo17::GetParameter(invocation));
4487 
4488  using FetchInfo18 = InvocationToFetch<ThreadIndicesType, Invocation, 18>;
4489  using FetchType18 = typename FetchInfo18::type;
4490  FetchType18 fetch18;
4491  auto p18 =
4492  fetch18.Load(threadIndices, FetchInfo18::GetParameter(invocation));
4493 
4494  // If you got a compile error on the following line, it probably means that
4495  // the operator() of a worklet does not match the definition expected. One
4496  // common problem is that the operator() method must be declared const. Check
4497  // to make sure the "const" keyword is after parameters. Another common
4498  // problem is that the type of one or more parameters is incompatible with
4499  // the actual type that Viskores creates in the execution environment. Make sure
4500  // that the types of the worklet operator() parameters match those in the
4501  // ExecutionSignature. The compiler error might help you narrow down which
4502  // parameter is wrong and the types that did not match.
4503  worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18);
4504 
4505  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
4506  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
4507  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
4508  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
4509  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
4510  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
4511  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
4512  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
4513  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
4514  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
4515  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
4516  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
4517  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
4518  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
4519  fetch15.Store(threadIndices, FetchInfo15::GetParameter(invocation), p15);
4520  fetch16.Store(threadIndices, FetchInfo16::GetParameter(invocation), p16);
4521  fetch17.Store(threadIndices, FetchInfo17::GetParameter(invocation), p17);
4522  fetch18.Store(threadIndices, FetchInfo18::GetParameter(invocation), p18);
4523 }
4524 
4525 template <typename WorkletType,
4526  typename ParameterInterface,
4527  typename ControlInterface,
4528  viskores::IdComponent InputDomainIndex,
4529  typename OutputToInputMapType,
4530  typename VisitArrayType,
4531  typename ThreadToOutputMapType,
4532  typename DeviceAdapterTag,
4533  typename ThreadIndicesType,
4534  typename R,
4535  typename P1,
4536  typename P2,
4537  typename P3,
4538  typename P4,
4539  typename P5,
4540  typename P6,
4541  typename P7,
4542  typename P8,
4543  typename P9,
4544  typename P10,
4545  typename P11,
4546  typename P12,
4547  typename P13,
4548  typename P14,
4549  typename P15,
4550  typename P16,
4551  typename P17,
4552  typename P18,
4553  typename P19>
4554 VISKORES_EXEC void DoWorkletInvokeFunctor(
4555  const WorkletType& worklet,
4556  const viskores::internal::Invocation<ParameterInterface,
4557  ControlInterface,
4558  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19)>,
4559  InputDomainIndex,
4560  OutputToInputMapType,
4561  VisitArrayType,
4562  ThreadToOutputMapType,
4563  DeviceAdapterTag>& invocation,
4564  const ThreadIndicesType& threadIndices)
4565 {
4566  using Invocation = viskores::internal::Invocation<ParameterInterface,
4567  ControlInterface,
4568  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19)>,
4569  InputDomainIndex,
4570  OutputToInputMapType,
4571  VisitArrayType,
4572  ThreadToOutputMapType,
4573  DeviceAdapterTag>;
4574 
4575  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
4576  using FetchType1 = typename FetchInfo1::type;
4577  FetchType1 fetch1;
4578  auto p1 =
4579  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
4580 
4581  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
4582  using FetchType2 = typename FetchInfo2::type;
4583  FetchType2 fetch2;
4584  auto p2 =
4585  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
4586 
4587  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
4588  using FetchType3 = typename FetchInfo3::type;
4589  FetchType3 fetch3;
4590  auto p3 =
4591  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
4592 
4593  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
4594  using FetchType4 = typename FetchInfo4::type;
4595  FetchType4 fetch4;
4596  auto p4 =
4597  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
4598 
4599  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
4600  using FetchType5 = typename FetchInfo5::type;
4601  FetchType5 fetch5;
4602  auto p5 =
4603  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
4604 
4605  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
4606  using FetchType6 = typename FetchInfo6::type;
4607  FetchType6 fetch6;
4608  auto p6 =
4609  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
4610 
4611  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
4612  using FetchType7 = typename FetchInfo7::type;
4613  FetchType7 fetch7;
4614  auto p7 =
4615  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
4616 
4617  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
4618  using FetchType8 = typename FetchInfo8::type;
4619  FetchType8 fetch8;
4620  auto p8 =
4621  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
4622 
4623  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
4624  using FetchType9 = typename FetchInfo9::type;
4625  FetchType9 fetch9;
4626  auto p9 =
4627  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
4628 
4629  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
4630  using FetchType10 = typename FetchInfo10::type;
4631  FetchType10 fetch10;
4632  auto p10 =
4633  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
4634 
4635  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
4636  using FetchType11 = typename FetchInfo11::type;
4637  FetchType11 fetch11;
4638  auto p11 =
4639  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
4640 
4641  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
4642  using FetchType12 = typename FetchInfo12::type;
4643  FetchType12 fetch12;
4644  auto p12 =
4645  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
4646 
4647  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
4648  using FetchType13 = typename FetchInfo13::type;
4649  FetchType13 fetch13;
4650  auto p13 =
4651  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
4652 
4653  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
4654  using FetchType14 = typename FetchInfo14::type;
4655  FetchType14 fetch14;
4656  auto p14 =
4657  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
4658 
4659  using FetchInfo15 = InvocationToFetch<ThreadIndicesType, Invocation, 15>;
4660  using FetchType15 = typename FetchInfo15::type;
4661  FetchType15 fetch15;
4662  auto p15 =
4663  fetch15.Load(threadIndices, FetchInfo15::GetParameter(invocation));
4664 
4665  using FetchInfo16 = InvocationToFetch<ThreadIndicesType, Invocation, 16>;
4666  using FetchType16 = typename FetchInfo16::type;
4667  FetchType16 fetch16;
4668  auto p16 =
4669  fetch16.Load(threadIndices, FetchInfo16::GetParameter(invocation));
4670 
4671  using FetchInfo17 = InvocationToFetch<ThreadIndicesType, Invocation, 17>;
4672  using FetchType17 = typename FetchInfo17::type;
4673  FetchType17 fetch17;
4674  auto p17 =
4675  fetch17.Load(threadIndices, FetchInfo17::GetParameter(invocation));
4676 
4677  using FetchInfo18 = InvocationToFetch<ThreadIndicesType, Invocation, 18>;
4678  using FetchType18 = typename FetchInfo18::type;
4679  FetchType18 fetch18;
4680  auto p18 =
4681  fetch18.Load(threadIndices, FetchInfo18::GetParameter(invocation));
4682 
4683  using FetchInfo19 = InvocationToFetch<ThreadIndicesType, Invocation, 19>;
4684  using FetchType19 = typename FetchInfo19::type;
4685  FetchType19 fetch19;
4686  auto p19 =
4687  fetch19.Load(threadIndices, FetchInfo19::GetParameter(invocation));
4688 
4689  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
4690  using ReturnFetchType = typename FetchInfo0::type;
4691  ReturnFetchType returnFetch;
4692  // If you got a compile error on the following line, it probably means that
4693  // the operator() of a worklet does not match the definition expected. One
4694  // common problem is that the operator() method must be declared const. Check
4695  // to make sure the "const" keyword is after parameters. Another common
4696  // problem is that the type of one or more parameters is incompatible with
4697  // the actual type that Viskores creates in the execution environment. Make sure
4698  // that the types of the worklet operator() parameters match those in the
4699  // ExecutionSignature. The compiler error might help you narrow down which
4700  // parameter is wrong and the types that did not match.
4701  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19);
4702 
4703  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
4704  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
4705  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
4706  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
4707  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
4708  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
4709  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
4710  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
4711  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
4712  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
4713  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
4714  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
4715  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
4716  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
4717  fetch15.Store(threadIndices, FetchInfo15::GetParameter(invocation), p15);
4718  fetch16.Store(threadIndices, FetchInfo16::GetParameter(invocation), p16);
4719  fetch17.Store(threadIndices, FetchInfo17::GetParameter(invocation), p17);
4720  fetch18.Store(threadIndices, FetchInfo18::GetParameter(invocation), p18);
4721  fetch19.Store(threadIndices, FetchInfo19::GetParameter(invocation), p19);
4722 
4723  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
4724 }
4725 
4726 template <typename WorkletType,
4727  typename ParameterInterface,
4728  typename ControlInterface,
4729  viskores::IdComponent InputDomainIndex,
4730  typename OutputToInputMapType,
4731  typename VisitArrayType,
4732  typename ThreadToOutputMapType,
4733  typename DeviceAdapterTag,
4734  typename ThreadIndicesType,
4735  typename P1,
4736  typename P2,
4737  typename P3,
4738  typename P4,
4739  typename P5,
4740  typename P6,
4741  typename P7,
4742  typename P8,
4743  typename P9,
4744  typename P10,
4745  typename P11,
4746  typename P12,
4747  typename P13,
4748  typename P14,
4749  typename P15,
4750  typename P16,
4751  typename P17,
4752  typename P18,
4753  typename P19>
4754 VISKORES_EXEC void DoWorkletInvokeFunctor(
4755  const WorkletType& worklet,
4756  const viskores::internal::Invocation<ParameterInterface,
4757  ControlInterface,
4758  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19)>,
4759  InputDomainIndex,
4760  OutputToInputMapType,
4761  VisitArrayType,
4762  ThreadToOutputMapType,
4763  DeviceAdapterTag>& invocation,
4764  const ThreadIndicesType& threadIndices)
4765 {
4766  using Invocation =
4767  viskores::internal::Invocation<ParameterInterface,
4768  ControlInterface,
4769  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19)>,
4770  InputDomainIndex,
4771  OutputToInputMapType,
4772  VisitArrayType,
4773  ThreadToOutputMapType,
4774  DeviceAdapterTag>;
4775 
4776  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
4777  using FetchType1 = typename FetchInfo1::type;
4778  FetchType1 fetch1;
4779  auto p1 =
4780  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
4781 
4782  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
4783  using FetchType2 = typename FetchInfo2::type;
4784  FetchType2 fetch2;
4785  auto p2 =
4786  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
4787 
4788  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
4789  using FetchType3 = typename FetchInfo3::type;
4790  FetchType3 fetch3;
4791  auto p3 =
4792  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
4793 
4794  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
4795  using FetchType4 = typename FetchInfo4::type;
4796  FetchType4 fetch4;
4797  auto p4 =
4798  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
4799 
4800  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
4801  using FetchType5 = typename FetchInfo5::type;
4802  FetchType5 fetch5;
4803  auto p5 =
4804  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
4805 
4806  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
4807  using FetchType6 = typename FetchInfo6::type;
4808  FetchType6 fetch6;
4809  auto p6 =
4810  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
4811 
4812  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
4813  using FetchType7 = typename FetchInfo7::type;
4814  FetchType7 fetch7;
4815  auto p7 =
4816  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
4817 
4818  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
4819  using FetchType8 = typename FetchInfo8::type;
4820  FetchType8 fetch8;
4821  auto p8 =
4822  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
4823 
4824  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
4825  using FetchType9 = typename FetchInfo9::type;
4826  FetchType9 fetch9;
4827  auto p9 =
4828  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
4829 
4830  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
4831  using FetchType10 = typename FetchInfo10::type;
4832  FetchType10 fetch10;
4833  auto p10 =
4834  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
4835 
4836  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
4837  using FetchType11 = typename FetchInfo11::type;
4838  FetchType11 fetch11;
4839  auto p11 =
4840  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
4841 
4842  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
4843  using FetchType12 = typename FetchInfo12::type;
4844  FetchType12 fetch12;
4845  auto p12 =
4846  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
4847 
4848  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
4849  using FetchType13 = typename FetchInfo13::type;
4850  FetchType13 fetch13;
4851  auto p13 =
4852  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
4853 
4854  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
4855  using FetchType14 = typename FetchInfo14::type;
4856  FetchType14 fetch14;
4857  auto p14 =
4858  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
4859 
4860  using FetchInfo15 = InvocationToFetch<ThreadIndicesType, Invocation, 15>;
4861  using FetchType15 = typename FetchInfo15::type;
4862  FetchType15 fetch15;
4863  auto p15 =
4864  fetch15.Load(threadIndices, FetchInfo15::GetParameter(invocation));
4865 
4866  using FetchInfo16 = InvocationToFetch<ThreadIndicesType, Invocation, 16>;
4867  using FetchType16 = typename FetchInfo16::type;
4868  FetchType16 fetch16;
4869  auto p16 =
4870  fetch16.Load(threadIndices, FetchInfo16::GetParameter(invocation));
4871 
4872  using FetchInfo17 = InvocationToFetch<ThreadIndicesType, Invocation, 17>;
4873  using FetchType17 = typename FetchInfo17::type;
4874  FetchType17 fetch17;
4875  auto p17 =
4876  fetch17.Load(threadIndices, FetchInfo17::GetParameter(invocation));
4877 
4878  using FetchInfo18 = InvocationToFetch<ThreadIndicesType, Invocation, 18>;
4879  using FetchType18 = typename FetchInfo18::type;
4880  FetchType18 fetch18;
4881  auto p18 =
4882  fetch18.Load(threadIndices, FetchInfo18::GetParameter(invocation));
4883 
4884  using FetchInfo19 = InvocationToFetch<ThreadIndicesType, Invocation, 19>;
4885  using FetchType19 = typename FetchInfo19::type;
4886  FetchType19 fetch19;
4887  auto p19 =
4888  fetch19.Load(threadIndices, FetchInfo19::GetParameter(invocation));
4889 
4890  // If you got a compile error on the following line, it probably means that
4891  // the operator() of a worklet does not match the definition expected. One
4892  // common problem is that the operator() method must be declared const. Check
4893  // to make sure the "const" keyword is after parameters. Another common
4894  // problem is that the type of one or more parameters is incompatible with
4895  // the actual type that Viskores creates in the execution environment. Make sure
4896  // that the types of the worklet operator() parameters match those in the
4897  // ExecutionSignature. The compiler error might help you narrow down which
4898  // parameter is wrong and the types that did not match.
4899  worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19);
4900 
4901  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
4902  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
4903  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
4904  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
4905  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
4906  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
4907  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
4908  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
4909  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
4910  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
4911  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
4912  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
4913  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
4914  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
4915  fetch15.Store(threadIndices, FetchInfo15::GetParameter(invocation), p15);
4916  fetch16.Store(threadIndices, FetchInfo16::GetParameter(invocation), p16);
4917  fetch17.Store(threadIndices, FetchInfo17::GetParameter(invocation), p17);
4918  fetch18.Store(threadIndices, FetchInfo18::GetParameter(invocation), p18);
4919  fetch19.Store(threadIndices, FetchInfo19::GetParameter(invocation), p19);
4920 }
4921 
4922 template <typename WorkletType,
4923  typename ParameterInterface,
4924  typename ControlInterface,
4925  viskores::IdComponent InputDomainIndex,
4926  typename OutputToInputMapType,
4927  typename VisitArrayType,
4928  typename ThreadToOutputMapType,
4929  typename DeviceAdapterTag,
4930  typename ThreadIndicesType,
4931  typename R,
4932  typename P1,
4933  typename P2,
4934  typename P3,
4935  typename P4,
4936  typename P5,
4937  typename P6,
4938  typename P7,
4939  typename P8,
4940  typename P9,
4941  typename P10,
4942  typename P11,
4943  typename P12,
4944  typename P13,
4945  typename P14,
4946  typename P15,
4947  typename P16,
4948  typename P17,
4949  typename P18,
4950  typename P19,
4951  typename P20>
4952 VISKORES_EXEC void DoWorkletInvokeFunctor(
4953  const WorkletType& worklet,
4954  const viskores::internal::Invocation<ParameterInterface,
4955  ControlInterface,
4956  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20)>,
4957  InputDomainIndex,
4958  OutputToInputMapType,
4959  VisitArrayType,
4960  ThreadToOutputMapType,
4961  DeviceAdapterTag>& invocation,
4962  const ThreadIndicesType& threadIndices)
4963 {
4964  using Invocation = viskores::internal::Invocation<ParameterInterface,
4965  ControlInterface,
4966  viskores::internal::FunctionInterface<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20)>,
4967  InputDomainIndex,
4968  OutputToInputMapType,
4969  VisitArrayType,
4970  ThreadToOutputMapType,
4971  DeviceAdapterTag>;
4972 
4973  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
4974  using FetchType1 = typename FetchInfo1::type;
4975  FetchType1 fetch1;
4976  auto p1 =
4977  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
4978 
4979  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
4980  using FetchType2 = typename FetchInfo2::type;
4981  FetchType2 fetch2;
4982  auto p2 =
4983  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
4984 
4985  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
4986  using FetchType3 = typename FetchInfo3::type;
4987  FetchType3 fetch3;
4988  auto p3 =
4989  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
4990 
4991  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
4992  using FetchType4 = typename FetchInfo4::type;
4993  FetchType4 fetch4;
4994  auto p4 =
4995  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
4996 
4997  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
4998  using FetchType5 = typename FetchInfo5::type;
4999  FetchType5 fetch5;
5000  auto p5 =
5001  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
5002 
5003  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
5004  using FetchType6 = typename FetchInfo6::type;
5005  FetchType6 fetch6;
5006  auto p6 =
5007  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
5008 
5009  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
5010  using FetchType7 = typename FetchInfo7::type;
5011  FetchType7 fetch7;
5012  auto p7 =
5013  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
5014 
5015  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
5016  using FetchType8 = typename FetchInfo8::type;
5017  FetchType8 fetch8;
5018  auto p8 =
5019  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
5020 
5021  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
5022  using FetchType9 = typename FetchInfo9::type;
5023  FetchType9 fetch9;
5024  auto p9 =
5025  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
5026 
5027  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
5028  using FetchType10 = typename FetchInfo10::type;
5029  FetchType10 fetch10;
5030  auto p10 =
5031  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
5032 
5033  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
5034  using FetchType11 = typename FetchInfo11::type;
5035  FetchType11 fetch11;
5036  auto p11 =
5037  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
5038 
5039  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
5040  using FetchType12 = typename FetchInfo12::type;
5041  FetchType12 fetch12;
5042  auto p12 =
5043  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
5044 
5045  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
5046  using FetchType13 = typename FetchInfo13::type;
5047  FetchType13 fetch13;
5048  auto p13 =
5049  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
5050 
5051  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
5052  using FetchType14 = typename FetchInfo14::type;
5053  FetchType14 fetch14;
5054  auto p14 =
5055  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
5056 
5057  using FetchInfo15 = InvocationToFetch<ThreadIndicesType, Invocation, 15>;
5058  using FetchType15 = typename FetchInfo15::type;
5059  FetchType15 fetch15;
5060  auto p15 =
5061  fetch15.Load(threadIndices, FetchInfo15::GetParameter(invocation));
5062 
5063  using FetchInfo16 = InvocationToFetch<ThreadIndicesType, Invocation, 16>;
5064  using FetchType16 = typename FetchInfo16::type;
5065  FetchType16 fetch16;
5066  auto p16 =
5067  fetch16.Load(threadIndices, FetchInfo16::GetParameter(invocation));
5068 
5069  using FetchInfo17 = InvocationToFetch<ThreadIndicesType, Invocation, 17>;
5070  using FetchType17 = typename FetchInfo17::type;
5071  FetchType17 fetch17;
5072  auto p17 =
5073  fetch17.Load(threadIndices, FetchInfo17::GetParameter(invocation));
5074 
5075  using FetchInfo18 = InvocationToFetch<ThreadIndicesType, Invocation, 18>;
5076  using FetchType18 = typename FetchInfo18::type;
5077  FetchType18 fetch18;
5078  auto p18 =
5079  fetch18.Load(threadIndices, FetchInfo18::GetParameter(invocation));
5080 
5081  using FetchInfo19 = InvocationToFetch<ThreadIndicesType, Invocation, 19>;
5082  using FetchType19 = typename FetchInfo19::type;
5083  FetchType19 fetch19;
5084  auto p19 =
5085  fetch19.Load(threadIndices, FetchInfo19::GetParameter(invocation));
5086 
5087  using FetchInfo20 = InvocationToFetch<ThreadIndicesType, Invocation, 20>;
5088  using FetchType20 = typename FetchInfo20::type;
5089  FetchType20 fetch20;
5090  auto p20 =
5091  fetch20.Load(threadIndices, FetchInfo20::GetParameter(invocation));
5092 
5093  using FetchInfo0 = InvocationToFetch<ThreadIndicesType, Invocation, 0>;
5094  using ReturnFetchType = typename FetchInfo0::type;
5095  ReturnFetchType returnFetch;
5096  // If you got a compile error on the following line, it probably means that
5097  // the operator() of a worklet does not match the definition expected. One
5098  // common problem is that the operator() method must be declared const. Check
5099  // to make sure the "const" keyword is after parameters. Another common
5100  // problem is that the type of one or more parameters is incompatible with
5101  // the actual type that Viskores creates in the execution environment. Make sure
5102  // that the types of the worklet operator() parameters match those in the
5103  // ExecutionSignature. The compiler error might help you narrow down which
5104  // parameter is wrong and the types that did not match.
5105  auto r = worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20);
5106 
5107  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
5108  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
5109  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
5110  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
5111  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
5112  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
5113  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
5114  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
5115  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
5116  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
5117  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
5118  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
5119  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
5120  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
5121  fetch15.Store(threadIndices, FetchInfo15::GetParameter(invocation), p15);
5122  fetch16.Store(threadIndices, FetchInfo16::GetParameter(invocation), p16);
5123  fetch17.Store(threadIndices, FetchInfo17::GetParameter(invocation), p17);
5124  fetch18.Store(threadIndices, FetchInfo18::GetParameter(invocation), p18);
5125  fetch19.Store(threadIndices, FetchInfo19::GetParameter(invocation), p19);
5126  fetch20.Store(threadIndices, FetchInfo20::GetParameter(invocation), p20);
5127 
5128  returnFetch.Store(threadIndices, FetchInfo0::GetParameter(invocation), r);
5129 }
5130 
5131 template <typename WorkletType,
5132  typename ParameterInterface,
5133  typename ControlInterface,
5134  viskores::IdComponent InputDomainIndex,
5135  typename OutputToInputMapType,
5136  typename VisitArrayType,
5137  typename ThreadToOutputMapType,
5138  typename DeviceAdapterTag,
5139  typename ThreadIndicesType,
5140  typename P1,
5141  typename P2,
5142  typename P3,
5143  typename P4,
5144  typename P5,
5145  typename P6,
5146  typename P7,
5147  typename P8,
5148  typename P9,
5149  typename P10,
5150  typename P11,
5151  typename P12,
5152  typename P13,
5153  typename P14,
5154  typename P15,
5155  typename P16,
5156  typename P17,
5157  typename P18,
5158  typename P19,
5159  typename P20>
5160 VISKORES_EXEC void DoWorkletInvokeFunctor(
5161  const WorkletType& worklet,
5162  const viskores::internal::Invocation<ParameterInterface,
5163  ControlInterface,
5164  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20)>,
5165  InputDomainIndex,
5166  OutputToInputMapType,
5167  VisitArrayType,
5168  ThreadToOutputMapType,
5169  DeviceAdapterTag>& invocation,
5170  const ThreadIndicesType& threadIndices)
5171 {
5172  using Invocation =
5173  viskores::internal::Invocation<ParameterInterface,
5174  ControlInterface,
5175  viskores::internal::FunctionInterface<void(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20)>,
5176  InputDomainIndex,
5177  OutputToInputMapType,
5178  VisitArrayType,
5179  ThreadToOutputMapType,
5180  DeviceAdapterTag>;
5181 
5182  using FetchInfo1 = InvocationToFetch<ThreadIndicesType, Invocation, 1>;
5183  using FetchType1 = typename FetchInfo1::type;
5184  FetchType1 fetch1;
5185  auto p1 =
5186  fetch1.Load(threadIndices, FetchInfo1::GetParameter(invocation));
5187 
5188  using FetchInfo2 = InvocationToFetch<ThreadIndicesType, Invocation, 2>;
5189  using FetchType2 = typename FetchInfo2::type;
5190  FetchType2 fetch2;
5191  auto p2 =
5192  fetch2.Load(threadIndices, FetchInfo2::GetParameter(invocation));
5193 
5194  using FetchInfo3 = InvocationToFetch<ThreadIndicesType, Invocation, 3>;
5195  using FetchType3 = typename FetchInfo3::type;
5196  FetchType3 fetch3;
5197  auto p3 =
5198  fetch3.Load(threadIndices, FetchInfo3::GetParameter(invocation));
5199 
5200  using FetchInfo4 = InvocationToFetch<ThreadIndicesType, Invocation, 4>;
5201  using FetchType4 = typename FetchInfo4::type;
5202  FetchType4 fetch4;
5203  auto p4 =
5204  fetch4.Load(threadIndices, FetchInfo4::GetParameter(invocation));
5205 
5206  using FetchInfo5 = InvocationToFetch<ThreadIndicesType, Invocation, 5>;
5207  using FetchType5 = typename FetchInfo5::type;
5208  FetchType5 fetch5;
5209  auto p5 =
5210  fetch5.Load(threadIndices, FetchInfo5::GetParameter(invocation));
5211 
5212  using FetchInfo6 = InvocationToFetch<ThreadIndicesType, Invocation, 6>;
5213  using FetchType6 = typename FetchInfo6::type;
5214  FetchType6 fetch6;
5215  auto p6 =
5216  fetch6.Load(threadIndices, FetchInfo6::GetParameter(invocation));
5217 
5218  using FetchInfo7 = InvocationToFetch<ThreadIndicesType, Invocation, 7>;
5219  using FetchType7 = typename FetchInfo7::type;
5220  FetchType7 fetch7;
5221  auto p7 =
5222  fetch7.Load(threadIndices, FetchInfo7::GetParameter(invocation));
5223 
5224  using FetchInfo8 = InvocationToFetch<ThreadIndicesType, Invocation, 8>;
5225  using FetchType8 = typename FetchInfo8::type;
5226  FetchType8 fetch8;
5227  auto p8 =
5228  fetch8.Load(threadIndices, FetchInfo8::GetParameter(invocation));
5229 
5230  using FetchInfo9 = InvocationToFetch<ThreadIndicesType, Invocation, 9>;
5231  using FetchType9 = typename FetchInfo9::type;
5232  FetchType9 fetch9;
5233  auto p9 =
5234  fetch9.Load(threadIndices, FetchInfo9::GetParameter(invocation));
5235 
5236  using FetchInfo10 = InvocationToFetch<ThreadIndicesType, Invocation, 10>;
5237  using FetchType10 = typename FetchInfo10::type;
5238  FetchType10 fetch10;
5239  auto p10 =
5240  fetch10.Load(threadIndices, FetchInfo10::GetParameter(invocation));
5241 
5242  using FetchInfo11 = InvocationToFetch<ThreadIndicesType, Invocation, 11>;
5243  using FetchType11 = typename FetchInfo11::type;
5244  FetchType11 fetch11;
5245  auto p11 =
5246  fetch11.Load(threadIndices, FetchInfo11::GetParameter(invocation));
5247 
5248  using FetchInfo12 = InvocationToFetch<ThreadIndicesType, Invocation, 12>;
5249  using FetchType12 = typename FetchInfo12::type;
5250  FetchType12 fetch12;
5251  auto p12 =
5252  fetch12.Load(threadIndices, FetchInfo12::GetParameter(invocation));
5253 
5254  using FetchInfo13 = InvocationToFetch<ThreadIndicesType, Invocation, 13>;
5255  using FetchType13 = typename FetchInfo13::type;
5256  FetchType13 fetch13;
5257  auto p13 =
5258  fetch13.Load(threadIndices, FetchInfo13::GetParameter(invocation));
5259 
5260  using FetchInfo14 = InvocationToFetch<ThreadIndicesType, Invocation, 14>;
5261  using FetchType14 = typename FetchInfo14::type;
5262  FetchType14 fetch14;
5263  auto p14 =
5264  fetch14.Load(threadIndices, FetchInfo14::GetParameter(invocation));
5265 
5266  using FetchInfo15 = InvocationToFetch<ThreadIndicesType, Invocation, 15>;
5267  using FetchType15 = typename FetchInfo15::type;
5268  FetchType15 fetch15;
5269  auto p15 =
5270  fetch15.Load(threadIndices, FetchInfo15::GetParameter(invocation));
5271 
5272  using FetchInfo16 = InvocationToFetch<ThreadIndicesType, Invocation, 16>;
5273  using FetchType16 = typename FetchInfo16::type;
5274  FetchType16 fetch16;
5275  auto p16 =
5276  fetch16.Load(threadIndices, FetchInfo16::GetParameter(invocation));
5277 
5278  using FetchInfo17 = InvocationToFetch<ThreadIndicesType, Invocation, 17>;
5279  using FetchType17 = typename FetchInfo17::type;
5280  FetchType17 fetch17;
5281  auto p17 =
5282  fetch17.Load(threadIndices, FetchInfo17::GetParameter(invocation));
5283 
5284  using FetchInfo18 = InvocationToFetch<ThreadIndicesType, Invocation, 18>;
5285  using FetchType18 = typename FetchInfo18::type;
5286  FetchType18 fetch18;
5287  auto p18 =
5288  fetch18.Load(threadIndices, FetchInfo18::GetParameter(invocation));
5289 
5290  using FetchInfo19 = InvocationToFetch<ThreadIndicesType, Invocation, 19>;
5291  using FetchType19 = typename FetchInfo19::type;
5292  FetchType19 fetch19;
5293  auto p19 =
5294  fetch19.Load(threadIndices, FetchInfo19::GetParameter(invocation));
5295 
5296  using FetchInfo20 = InvocationToFetch<ThreadIndicesType, Invocation, 20>;
5297  using FetchType20 = typename FetchInfo20::type;
5298  FetchType20 fetch20;
5299  auto p20 =
5300  fetch20.Load(threadIndices, FetchInfo20::GetParameter(invocation));
5301 
5302  // If you got a compile error on the following line, it probably means that
5303  // the operator() of a worklet does not match the definition expected. One
5304  // common problem is that the operator() method must be declared const. Check
5305  // to make sure the "const" keyword is after parameters. Another common
5306  // problem is that the type of one or more parameters is incompatible with
5307  // the actual type that Viskores creates in the execution environment. Make sure
5308  // that the types of the worklet operator() parameters match those in the
5309  // ExecutionSignature. The compiler error might help you narrow down which
5310  // parameter is wrong and the types that did not match.
5311  worklet(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20);
5312 
5313  fetch1.Store(threadIndices, FetchInfo1::GetParameter(invocation), p1);
5314  fetch2.Store(threadIndices, FetchInfo2::GetParameter(invocation), p2);
5315  fetch3.Store(threadIndices, FetchInfo3::GetParameter(invocation), p3);
5316  fetch4.Store(threadIndices, FetchInfo4::GetParameter(invocation), p4);
5317  fetch5.Store(threadIndices, FetchInfo5::GetParameter(invocation), p5);
5318  fetch6.Store(threadIndices, FetchInfo6::GetParameter(invocation), p6);
5319  fetch7.Store(threadIndices, FetchInfo7::GetParameter(invocation), p7);
5320  fetch8.Store(threadIndices, FetchInfo8::GetParameter(invocation), p8);
5321  fetch9.Store(threadIndices, FetchInfo9::GetParameter(invocation), p9);
5322  fetch10.Store(threadIndices, FetchInfo10::GetParameter(invocation), p10);
5323  fetch11.Store(threadIndices, FetchInfo11::GetParameter(invocation), p11);
5324  fetch12.Store(threadIndices, FetchInfo12::GetParameter(invocation), p12);
5325  fetch13.Store(threadIndices, FetchInfo13::GetParameter(invocation), p13);
5326  fetch14.Store(threadIndices, FetchInfo14::GetParameter(invocation), p14);
5327  fetch15.Store(threadIndices, FetchInfo15::GetParameter(invocation), p15);
5328  fetch16.Store(threadIndices, FetchInfo16::GetParameter(invocation), p16);
5329  fetch17.Store(threadIndices, FetchInfo17::GetParameter(invocation), p17);
5330  fetch18.Store(threadIndices, FetchInfo18::GetParameter(invocation), p18);
5331  fetch19.Store(threadIndices, FetchInfo19::GetParameter(invocation), p19);
5332  fetch20.Store(threadIndices, FetchInfo20::GetParameter(invocation), p20);
5333 }
5334 
5335 // clang-format on
5336 }
5337 }
5338 }
5339 } // namespace viskores::exec::internal::detail
5340 
5341 #endif //viskores_exec_internal_WorkletInvokeFunctorDetail_h
viskores::exec::arg::FetchTagExecObject
Fetch tag for execution objects.
Definition: FetchTagExecObject.h:40
viskores::IdComponent
viskores::Int32 IdComponent
Base type to use to index small lists.
Definition: Types.h:202
FetchTagExecObject.h
viskores::exec::arg::Fetch
Class for loading and storing values in thread instance.
Definition: Fetch.h:57
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
Fetch.h
FunctionInterface.h
Invocation.h
VISKORES_EXEC
#define VISKORES_EXEC
Definition: ExportMacros.h:59