15 View<rtype*,CLayout,DeviceType>
iseg;
30 KOKKOS_INLINE_FUNCTION
bool is_inside(
int i)
const {
33 for (
int is=0; is<
iseg.size(); is++){
34 if(
iseg(is).start <= i+1 && i+1 <=
iseg(is).end ){
45 View<int**,CLayout,DeviceType>
tr;
46 View<double***,CLayout,DeviceType>
p;
47 View<double**,CLayout,DeviceType>
dx;
53 :
sgn(-(sml_bt_sign<0.0 ? -1.0 : 1.0)),
71 Kokkos::parallel_for(
"gradparx2", Kokkos::RangePolicy<ExSpace>(0,is_inside_local.extent(0)), KOKKOS_LAMBDA(
const int i ){
void array_deep_copy(T *array, const Kokkos::View< T *, Kokkos::LayoutRight, Device > &view)
Definition: array_deep_copy.hpp:11
View< int **, CLayout, DeviceType > tr
Definition: gradparx2.hpp:45
Definition: gradparx2.hpp:7
KOKKOS_INLINE_FUNCTION bool is_inside(int i) const
Definition: gradparx2.hpp:30
int end
Definition: gradparx2.hpp:9
void set_is_inside(const Boundary &bd, const View< bool *, CLayout, DeviceType > &is_inside_local)
Definition: gradparx2.hpp:70
View< double **, CLayout, DeviceType > dx
Definition: gradparx2.hpp:47
GradParXTmp()
Definition: gradparx2.hpp:50
double sgn
Definition: gradparx2.hpp:44
Definition: gradparx2.hpp:43
View< bool *, CLayout, DeviceType > is_inside
Definition: gradparx2.hpp:48
GradParXTmp(const Grid< DeviceType > &grid, int nseg, double sml_bt_sign, int *tr_fort, double *p_fort, double *dx_fort, rtype *bd_fort)
Definition: gradparx2.hpp:52
Definition: gradparx2.hpp:12
View< rtype *, CLayout, DeviceType > iseg
Definition: gradparx2.hpp:15
View< double ***, CLayout, DeviceType > p
Definition: gradparx2.hpp:46
void negative_gradparx2(const Grid< DeviceType > &grid, const GradParXTmp &gpxt, const Kokkos::View< double **, Kokkos::LayoutRight, DeviceType > &input, const Kokkos::View< double **, Kokkos::LayoutRight, DeviceType > &output)
Definition: gradparx2.cpp:23
void parallel_for(const std::string name, int n_ptl, Function func, Option option, HostAoSoA aosoa_h, DeviceAoSoA aosoa_d)
Definition: streamed_parallel_for.hpp:252
Boundary(int nseg, rtype *bd_fort)
Definition: gradparx2.hpp:17
int start
Definition: gradparx2.hpp:8
Kokkos::ViewAllocateWithoutInitializing NoInit
Definition: space_settings.hpp:68