FunctionInterfaceDetailPre.h 406 KB
Newer Older
1 2 3 4 5 6 7 8
//============================================================================
//  Copyright (c) Kitware, Inc.
//  All rights reserved.
//  See LICENSE.txt for details.
//  This software is distributed WITHOUT ANY WARRANTY; without even
//  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
//  PURPOSE.  See the above copyright notice for more information.
//
Kenneth Moreland's avatar
Kenneth Moreland committed
9
//  Copyright 2014 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
10
//  Copyright 2014 UT-Battelle, LLC.
11
//  Copyright 2014 Los Alamos National Security.
12
//
Kenneth Moreland's avatar
Kenneth Moreland committed
13
//  Under the terms of Contract DE-NA0003525 with NTESS,
14 15 16 17 18 19 20 21 22
//  the U.S. Government retains certain rights in this software.
//
//  Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
//  Laboratory (LANL), the U.S. Government retains certain rights in
//  this software.
//============================================================================
// **** DO NOT EDIT THIS FILE!!! ****
// This file is automatically generated by FunctionInterfaceDetailPre.h.in

23 24
#ifndef vtk_m_internal_FunctionInterfaceDetailPre_h
#define vtk_m_internal_FunctionInterfaceDetailPre_h
25

26
#if !defined(vtk_m_internal_FunctionInterface_h) && !defined(VTKM_TEST_HEADER_BUILD)
27 28 29 30
#error FunctionInterfaceDetailPre.h must be included from FunctionInterface.h
#endif

#include <vtkm/Types.h>
31
#include <vtkm/internal/IndexTag.h>
32

33 34 35
#include <type_traits>

#include <vtkm/internal/brigand.hpp>
36

37
#define VTKM_MAX_FUNCTION_PARAMETERS 20
38

39

40 41 42 43
namespace vtkm
{
namespace internal
{
44 45 46 47 48

/// This struct is used internally by FunctionInterface to store the return
/// value of a function. There is a special implementation for a return type of
/// void, which stores nothing.
///
49 50 51
template <typename T>
struct FunctionInterfaceReturnContainer
{
52
  T Value;
53
  static constexpr bool VALID = true;
54 55
};

56 57 58
template <>
struct FunctionInterfaceReturnContainer<void>
{
59
  // Nothing to store for void return.
60
  static constexpr bool VALID = false;
61 62
};

63 64
namespace detail
{
65 66 67 68 69 70

//============================================================================

// This templated class contains the state of parameters. If you get a compiler
// error stating that this class is not specialized, that probably means that
// you are using FunctionInterface with an unsupported number of arguments.
71
template <typename FunctionSignature>
72 73
struct ParameterContainer;

74 75
// clang-format off

76 77 78
template <typename R>
struct ParameterContainer<R()>
{
79 80
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
81 82
};

83 84
template <typename R,
          typename P1>
85 86
struct ParameterContainer<R(P1)>
{
87 88
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
89 90 91
  P1 Parameter1;
};

92 93 94
template <typename R,
          typename P1,
          typename P2>
95 96
struct ParameterContainer<R(P1, P2)>
{
97 98
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
99 100 101 102
  P1 Parameter1;
  P2 Parameter2;
};

103 104 105 106
template <typename R,
          typename P1,
          typename P2,
          typename P3>
107 108
struct ParameterContainer<R(P1, P2, P3)>
{
109 110
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
111 112 113 114 115
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
};

116 117 118 119 120
template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4>
121 122
struct ParameterContainer<R(P1, P2, P3, P4)>
{
123 124
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
125 126 127 128 129 130
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
};

131 132 133 134 135 136
template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5>
137 138
struct ParameterContainer<R(P1, P2, P3, P4, P5)>
{
139 140
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
141 142 143 144 145 146 147
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
};

148 149 150 151 152 153 154
template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6>
155 156
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6)>
{
157 158
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
159 160 161 162 163 164 165 166
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
};

167 168 169 170 171 172 173 174 175 176
template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7)>
{
177 178
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
179 180 181 182 183 184 185 186 187
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
};

188 189 190 191 192 193 194 195 196 197 198
template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8)>
{
199 200
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
201 202 203 204 205 206 207 208 209 210
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
};

211 212 213 214 215 216 217 218 219 220 221 222
template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8,
          typename P9>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8, P9)>
{
223 224
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
225 226 227 228 229 230 231 232 233 234 235
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
  P9 Parameter9;
};

236 237 238 239 240 241 242 243 244 245 246 247 248
template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8,
          typename P9,
          typename P10>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)>
{
249 250
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
251 252 253 254 255 256 257 258 259 260 261 262
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
  P9 Parameter9;
  P10 Parameter10;
};

263 264 265 266 267 268 269 270 271 272 273 274 275 276
template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8,
          typename P9,
          typename P10,
          typename P11>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)>
{
277 278
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
  P9 Parameter9;
  P10 Parameter10;
  P11 Parameter11;
};

template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8,
          typename P9,
          typename P10,
          typename P11,
          typename P12>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12)>
{
307 308
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
  P9 Parameter9;
  P10 Parameter10;
  P11 Parameter11;
  P12 Parameter12;
};

template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8,
          typename P9,
          typename P10,
          typename P11,
          typename P12,
          typename P13>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13)>
{
339 340
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
  P9 Parameter9;
  P10 Parameter10;
  P11 Parameter11;
  P12 Parameter12;
  P13 Parameter13;
};

template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8,
          typename P9,
          typename P10,
          typename P11,
          typename P12,
          typename P13,
          typename P14>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14)>
{
373 374
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
  P9 Parameter9;
  P10 Parameter10;
  P11 Parameter11;
  P12 Parameter12;
  P13 Parameter13;
  P14 Parameter14;
};

template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8,
          typename P9,
          typename P10,
          typename P11,
          typename P12,
          typename P13,
          typename P14,
          typename P15>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15)>
{
409 410
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
  P9 Parameter9;
  P10 Parameter10;
  P11 Parameter11;
  P12 Parameter12;
  P13 Parameter13;
  P14 Parameter14;
  P15 Parameter15;
};

template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8,
          typename P9,
          typename P10,
          typename P11,
          typename P12,
          typename P13,
          typename P14,
          typename P15,
          typename P16>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16)>
{
447 448
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
  P9 Parameter9;
  P10 Parameter10;
  P11 Parameter11;
  P12 Parameter12;
  P13 Parameter13;
  P14 Parameter14;
  P15 Parameter15;
  P16 Parameter16;
};

template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8,
          typename P9,
          typename P10,
          typename P11,
          typename P12,
          typename P13,
          typename P14,
          typename P15,
          typename P16,
          typename P17>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17)>
{
487 488
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
  P9 Parameter9;
  P10 Parameter10;
  P11 Parameter11;
  P12 Parameter12;
  P13 Parameter13;
  P14 Parameter14;
  P15 Parameter15;
  P16 Parameter16;
  P17 Parameter17;
};

template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8,
          typename P9,
          typename P10,
          typename P11,
          typename P12,
          typename P13,
          typename P14,
          typename P15,
          typename P16,
          typename P17,
          typename P18>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18)>
{
529 530
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
  P9 Parameter9;
  P10 Parameter10;
  P11 Parameter11;
  P12 Parameter12;
  P13 Parameter13;
  P14 Parameter14;
  P15 Parameter15;
  P16 Parameter16;
  P17 Parameter17;
  P18 Parameter18;
};

template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8,
          typename P9,
          typename P10,
          typename P11,
          typename P12,
          typename P13,
          typename P14,
          typename P15,
          typename P16,
          typename P17,
          typename P18,
          typename P19>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19)>
{
573 574
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
  P9 Parameter9;
  P10 Parameter10;
  P11 Parameter11;
  P12 Parameter12;
  P13 Parameter13;
  P14 Parameter14;
  P15 Parameter15;
  P16 Parameter16;
  P17 Parameter17;
  P18 Parameter18;
  P19 Parameter19;
};

template <typename R,
          typename P1,
          typename P2,
          typename P3,
          typename P4,
          typename P5,
          typename P6,
          typename P7,
          typename P8,
          typename P9,
          typename P10,
          typename P11,
          typename P12,
          typename P13,
          typename P14,
          typename P15,
          typename P16,
          typename P17,
          typename P18,
          typename P19,
          typename P20>
struct ParameterContainer<R(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20)>
{
619 620
  VTKM_SUPPRESS_EXEC_WARNINGS
  ~ParameterContainer() = default;
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642
  P1 Parameter1;
  P2 Parameter2;
  P3 Parameter3;
  P4 Parameter4;
  P5 Parameter5;
  P6 Parameter6;
  P7 Parameter7;
  P8 Parameter8;
  P9 Parameter9;
  P10 Parameter10;
  P11 Parameter11;
  P12 Parameter12;
  P13 Parameter13;
  P14 Parameter14;
  P15 Parameter15;
  P16 Parameter16;
  P17 Parameter17;
  P18 Parameter18;
  P19 Parameter19;
  P20 Parameter20;
};

643 644
// clang-format on

645
//============================================================================
646 647 648
template <typename>
struct FunctionSigInfo;
template <typename R, typename... ArgTypes>
649
struct FunctionSigInfo<R(ArgTypes...)>
650
{
651
  static constexpr std::size_t Arity = sizeof...(ArgTypes);
David C. Lonie's avatar
David C. Lonie committed
652
  using ArityType = std::integral_constant<int, static_cast<int>(Arity)>;
653 654

  using ResultType = R;
655
  using Components = brigand::list<R, ArgTypes...>;
656 657 658
  using Parameters = brigand::list<ArgTypes...>;
};

659 660 661
template <int, typename>
struct AtType;
template <int Index, typename R, typename... ArgTypes>
662 663
struct AtType<Index, R(ArgTypes...)>
{
664
  using type = brigand::at_c<brigand::list<R, ArgTypes...>, Index>;
665 666
};

667 668 669
template <typename Collection, typename NewType>
struct AppendType;
template <template <typename...> class L, typename T, typename NT, typename... U>
670 671
struct AppendType<L<T, U...>, NT>
{
672
  typedef T type(U..., NT);
673 674
};

675 676 677 678
template <typename Collection>
struct AsSigType;
template <template <typename...> class L, typename T, typename... U>
struct AsSigType<L<T, U...>>
679 680 681 682
{
  typedef T type(U...);
};

683 684 685
template <typename Components, vtkm::IdComponent ParameterIndex, typename NewType>
class ReplaceType
{
686
  using Index = std::integral_constant<std::size_t, (std::size_t)ParameterIndex>;
687
  using split = brigand::split_at<Components, Index>;
688 689 690
  using front = brigand::push_back<brigand::front<split>, NewType>;
  using back = brigand::pop_front<brigand::back<split>>;
  using replaced = brigand::append<front, back>;
691 692

public:
693
  using type = typename AsSigType<replaced>::type;
694
};
695

696

697 698
//============================================================================

699
template <int ParameterIndex>
700 701
struct ParameterContainerAccess;

702 703 704
template <>
struct ParameterContainerAccess<1>
{
705
  VTKM_SUPPRESS_EXEC_WARNINGS
706 707 708 709
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<1, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
710 711 712
    return parameters.Parameter1;
  }

713
  VTKM_SUPPRESS_EXEC_WARNINGS
714 715 716 717
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<1, FunctionSignature>::type& value)
  {
718 719
    parameters.Parameter1 = value;
  }
720 721

  VTKM_SUPPRESS_EXEC_WARNINGS
722 723 724 725
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
726 727
    dest.Parameter1 = std::move(src.Parameter1);
  }
728 729
};

730 731 732
template <>
struct ParameterContainerAccess<2>
{
733
  VTKM_SUPPRESS_EXEC_WARNINGS
734 735 736 737
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<2, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
738 739 740
    return parameters.Parameter2;
  }

741
  VTKM_SUPPRESS_EXEC_WARNINGS
742 743 744 745
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<2, FunctionSignature>::type& value)
  {
746 747
    parameters.Parameter2 = value;
  }
748 749

  VTKM_SUPPRESS_EXEC_WARNINGS
750 751 752 753
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
754 755
    dest.Parameter2 = std::move(src.Parameter2);
  }
756 757
};

758 759 760
template <>
struct ParameterContainerAccess<3>
{
761
  VTKM_SUPPRESS_EXEC_WARNINGS
762 763 764 765
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<3, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
766 767 768
    return parameters.Parameter3;
  }

769
  VTKM_SUPPRESS_EXEC_WARNINGS
770 771 772 773
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<3, FunctionSignature>::type& value)
  {
774 775
    parameters.Parameter3 = value;
  }
776 777

  VTKM_SUPPRESS_EXEC_WARNINGS
778 779 780 781
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
782 783
    dest.Parameter3 = std::move(src.Parameter3);
  }
784 785
};

786 787 788
template <>
struct ParameterContainerAccess<4>
{
789
  VTKM_SUPPRESS_EXEC_WARNINGS
790 791 792 793
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<4, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
794 795 796
    return parameters.Parameter4;
  }

797
  VTKM_SUPPRESS_EXEC_WARNINGS
798 799 800 801
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<4, FunctionSignature>::type& value)
  {
802 803
    parameters.Parameter4 = value;
  }
804 805

  VTKM_SUPPRESS_EXEC_WARNINGS
806 807 808 809
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
810 811
    dest.Parameter4 = std::move(src.Parameter4);
  }
812 813
};

814 815 816
template <>
struct ParameterContainerAccess<5>
{
817
  VTKM_SUPPRESS_EXEC_WARNINGS
818 819 820 821
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<5, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
822 823 824
    return parameters.Parameter5;
  }

825
  VTKM_SUPPRESS_EXEC_WARNINGS
826 827 828 829
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<5, FunctionSignature>::type& value)
  {
830 831
    parameters.Parameter5 = value;
  }
832 833

  VTKM_SUPPRESS_EXEC_WARNINGS
834 835 836 837
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
838 839
    dest.Parameter5 = std::move(src.Parameter5);
  }
840 841
};

842 843 844
template <>
struct ParameterContainerAccess<6>
{
845
  VTKM_SUPPRESS_EXEC_WARNINGS
846 847 848 849
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<6, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
850 851 852
    return parameters.Parameter6;
  }

853
  VTKM_SUPPRESS_EXEC_WARNINGS
854 855 856 857
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<6, FunctionSignature>::type& value)
  {
858 859
    parameters.Parameter6 = value;
  }
860 861

  VTKM_SUPPRESS_EXEC_WARNINGS
862 863 864 865
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
866 867
    dest.Parameter6 = std::move(src.Parameter6);
  }
868 869
};

870 871 872
template <>
struct ParameterContainerAccess<7>
{
873
  VTKM_SUPPRESS_EXEC_WARNINGS
874 875 876 877
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<7, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
878 879 880
    return parameters.Parameter7;
  }

881
  VTKM_SUPPRESS_EXEC_WARNINGS
882 883 884 885
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<7, FunctionSignature>::type& value)
  {
886 887
    parameters.Parameter7 = value;
  }
888 889

  VTKM_SUPPRESS_EXEC_WARNINGS
890 891 892 893
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
894 895
    dest.Parameter7 = std::move(src.Parameter7);
  }
896 897
};

898 899 900
template <>
struct ParameterContainerAccess<8>
{
901
  VTKM_SUPPRESS_EXEC_WARNINGS
902 903 904 905
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<8, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
906 907 908
    return parameters.Parameter8;
  }

909
  VTKM_SUPPRESS_EXEC_WARNINGS
910 911 912 913
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<8, FunctionSignature>::type& value)
  {
914 915
    parameters.Parameter8 = value;
  }
916 917

  VTKM_SUPPRESS_EXEC_WARNINGS
918 919 920 921
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
922 923
    dest.Parameter8 = std::move(src.Parameter8);
  }
924 925
};

926 927 928
template <>
struct ParameterContainerAccess<9>
{
929
  VTKM_SUPPRESS_EXEC_WARNINGS
930 931 932 933
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<9, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
934 935 936
    return parameters.Parameter9;
  }

937
  VTKM_SUPPRESS_EXEC_WARNINGS
938 939 940 941
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<9, FunctionSignature>::type& value)
  {
942 943
    parameters.Parameter9 = value;
  }
944 945

  VTKM_SUPPRESS_EXEC_WARNINGS
946 947 948 949
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
950 951
    dest.Parameter9 = std::move(src.Parameter9);
  }
952 953
};

954 955 956
template <>
struct ParameterContainerAccess<10>
{
957
  VTKM_SUPPRESS_EXEC_WARNINGS
958 959 960 961
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<10, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
962 963 964
    return parameters.Parameter10;
  }

965
  VTKM_SUPPRESS_EXEC_WARNINGS
966 967 968 969
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<10, FunctionSignature>::type& value)
  {
970 971
    parameters.Parameter10 = value;
  }
972 973

  VTKM_SUPPRESS_EXEC_WARNINGS
974 975 976 977
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
978 979
    dest.Parameter10 = std::move(src.Parameter10);
  }
980 981
};

982
template <>
983
struct ParameterContainerAccess<11>
984
{
985
  VTKM_SUPPRESS_EXEC_WARNINGS
986 987 988
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<11, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
989
  {
990
    return parameters.Parameter11;
991
  }
992

993
  VTKM_SUPPRESS_EXEC_WARNINGS
994 995 996
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<11, FunctionSignature>::type& value)
997
  {
998
    parameters.Parameter11 = value;
999
  }
1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
    dest.Parameter11 = std::move(src.Parameter11);
  }
};

template <>
struct ParameterContainerAccess<12>
{
  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<12, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
    return parameters.Parameter12;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<12, FunctionSignature>::type& value)
  {
    parameters.Parameter12 = value;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
    dest.Parameter12 = std::move(src.Parameter12);
  }
};

template <>
struct ParameterContainerAccess<13>
{
  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<13, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
    return parameters.Parameter13;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<13, FunctionSignature>::type& value)
  {
    parameters.Parameter13 = value;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
    dest.Parameter13 = std::move(src.Parameter13);
  }
};

template <>
struct ParameterContainerAccess<14>
{
  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<14, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
    return parameters.Parameter14;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<14, FunctionSignature>::type& value)
  {
    parameters.Parameter14 = value;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
    dest.Parameter14 = std::move(src.Parameter14);
  }
};

template <>
struct ParameterContainerAccess<15>
{
  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<15, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
    return parameters.Parameter15;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<15, FunctionSignature>::type& value)
  {
    parameters.Parameter15 = value;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
    dest.Parameter15 = std::move(src.Parameter15);
  }
};

template <>
struct ParameterContainerAccess<16>
{
  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<16, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
    return parameters.Parameter16;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<16, FunctionSignature>::type& value)
  {
    parameters.Parameter16 = value;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
    dest.Parameter16 = std::move(src.Parameter16);
  }
};

template <>
struct ParameterContainerAccess<17>
{
  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<17, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
    return parameters.Parameter17;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<17, FunctionSignature>::type& value)
  {
    parameters.Parameter17 = value;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
    dest.Parameter17 = std::move(src.Parameter17);
  }
};

template <>
struct ParameterContainerAccess<18>
{
  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<18, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
    return parameters.Parameter18;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<18, FunctionSignature>::type& value)
  {
    parameters.Parameter18 = value;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
    dest.Parameter18 = std::move(src.Parameter18);
  }
};

template <>
struct ParameterContainerAccess<19>
{
  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<19, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
    return parameters.Parameter19;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<19, FunctionSignature>::type& value)
  {
    parameters.Parameter19 = value;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
    dest.Parameter19 = std::move(src.Parameter19);
  }
};

template <>
struct ParameterContainerAccess<20>
{
  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT const typename AtType<20, FunctionSignature>::type& Get(
    const ParameterContainer<FunctionSignature>& parameters)
  {
    return parameters.Parameter20;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignature>
  VTKM_EXEC_CONT void Set(ParameterContainer<FunctionSignature>& parameters,
                          const typename AtType<20, FunctionSignature>::type& value)
  {
    parameters.Parameter20 = value;
  }

  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename FunctionSignatureDest, typename FunctionSignatureSrc>
  VTKM_EXEC_CONT void Move(ParameterContainer<FunctionSignatureDest>& dest,
                           const ParameterContainer<FunctionSignatureSrc>& src)
  {
    dest.Parameter20 = std::move(src.Parameter20);
  }
};


//============================================================================
template <vtkm::IdComponent NumToCopy>
struct CopyAllParameters;


template <>
struct CopyAllParameters<1>
{
  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename DestSignature, typename SrcSignature>
  VTKM_EXEC_CONT void Copy(vtkm::internal::detail::ParameterContainer<DestSignature>& dest,
                           const vtkm::internal::detail::ParameterContainer<SrcSignature>& src)
  {
    dest.Parameter1 = src.Parameter1;
  }
};
template <>
struct CopyAllParameters<2>
{
  VTKM_SUPPRESS_EXEC_WARNINGS
  template <typename DestSignature, typename SrcSignature>
  VTKM_EXEC_CONT void Copy(vtkm::internal::detail::ParameterContainer<DestSignature>& dest,
                           const vtkm::internal::detail::ParameterContainer<SrcSignature>& src)
  {
    dest.Parameter1 = src.Parameter1;
    dest.Parameter2 = src.Parameter2;
  }
};
1291 1292 1293
template <>
struct CopyAllParameters<3>
{
1294
  VTKM_SUPPRESS_EXEC_WARNINGS
1295 1296 1297
  template <typename DestSignature, typename SrcSignature>
  VTKM_EXEC_CONT void Copy(vtkm::internal::detail::ParameterContainer<DestSignature>& dest,