Cabana AoSoA objects can be sorted, binned, and permuted based on a variety of user-defined parameters.
Header File: Cabana_Sort.hpp
using DataTypes = Cabana::MemberTypes<double,int>; using DeviceType = Kokkos::Device<Kokkos::Serial, Kokkos::HostSpace>; Cabana::AoSoA<DataTypes,DeviceType> aosoa( num_tuple ); // Create keys auto keys = slice<1>( aosoa ); // Sort auto sort_data = Cabana::sortByKey( keys ); Cabana::permute( sort_data, aosoa ); // Bin int num_bin = 2; auto bin_data = Cabana::binByKey( keys, num_bin ); Cabana::permute( bin_data, aosoa );
This is part of the Programming Guide series
There was an error while loading. Please reload this page.