text: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
  // Copyright (c) 2017-19, Lawrence Livermore National Security, LLC
  // and RAJA Performance Suite project contributors.
  // See the RAJAPerf/COPYRIGHT file for details.
  //
  // SPDX-License-Identifier: (BSD-3-Clause)
  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
  
  #include "LINSUM.hpp"
  
  #include "RAJA/RAJA.hpp"
  
  #include <iostream>
  
  namespace rajaperf
  {
  namespace basic
  {
  
  
  void LINSUM::runSeqVariant(VariantID vid)
  {
    const Index_type run_reps = getRunReps();
    const Index_type ibegin = 0;
    const Index_type iend = getRunSize();
  
    LINSUM_DATA_SETUP;
  
    auto linsum_lam = [=](Index_type i) {
                       LINSUM_BODY;
                     };
  
    switch ( vid ) {
  
      case Base_Seq : {
  
        startTimer();
        for (RepIndex_type irep = 0; irep < run_reps; ++irep) {
  
          for (Index_type i = ibegin; i < iend; ++i ) {
            LINSUM_BODY;
          }
  
        }
        stopTimer();
  
        break;
      }
  
  #if defined(RUN_RAJA_SEQ)
      case Lambda_Seq : {
  
        startTimer();
        for (RepIndex_type irep = 0; irep < run_reps; ++irep) {
  
          for (Index_type i = ibegin; i < iend; ++i ) {
            linsum_lam(i);
          }
  
        }
        stopTimer();
  
        break;
      }
  
      case RAJA_Seq : {
  
        startTimer();
        for (RepIndex_type irep = 0; irep < run_reps; ++irep) {
  
          RAJA::forall<RAJA::simd_exec>(
            RAJA::RangeSegment(ibegin, iend), linsum_lam);
  
        }
        stopTimer();
  
        break;
      }
  #endif
  
      default : {
        std::cout << "\n  LINSUM : Unknown variant id = " << vid << std::endl;
      }
  
    }
  
  }
  
  } // end namespace basic
  } // end namespace rajaperf
  