Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://www.mooseframework.org 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #include "KokkosThread.h" 11 : 12 : namespace Moose 13 : { 14 : namespace Kokkos 15 : { 16 : 17 : void 18 67130 : Thread::resize(std::vector<ThreadID> dims) 19 : { 20 67130 : _size = 1; 21 67130 : _dim = dims.size(); 22 : 23 328538 : for (unsigned int dim = 0; dim < _dim; ++dim) 24 : { 25 261408 : _dims[dim] = dims[dim]; 26 261408 : _strides[dim] = dim ? _strides[dim - 1] * dims[dim - 1] : 1; 27 261408 : _size *= dims[dim]; 28 : } 29 67130 : } 30 : 31 : } // namespace Kokkos 32 : } // namespace Moose