PACMAN 0.1.0
Portable Algorithms for Coupling, Mapping, and Adaptive iNterpolation
Loading...
Searching...
No Matches
utils.hpp File Reference
#include <Kokkos_Core.hpp>
#include <cmath>
#include <filesystem>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream>
#include "common/types.hpp"

Go to the source code of this file.

Namespaces

namespace  PACMAN
namespace  PACMAN::RbfPum

Macros

#define SEND_TO_HOST(view)

Typedefs

template<typename T>
using PACMAN::RbfPum::base_type
 Returns a type without reference or const/volatile modifiers.

Functions

template<typename ExecSpace>
KOKKOS_FORCEINLINE_FUNCTION constexpr bool PACMAN::RbfPum::IsHostAccessible (void)
static void PACMAN::RbfPum::PrintCudaMemoryUsage ()
 If Cuda is activated, prints the used Nvidia device memory, else do nothing.
template<typename ViewType>
void PACMAN::RbfPum::PrintSizeOfView (ViewType &v)
 Prints the memory usage of a Kokkos::View.
template<typename ViewType>
void PACMAN::RbfPum::PrintView (ViewType &v, std::string sep=" ")
template<typename DataView>
void PACMAN::RbfPum::ExportMatView (const DataView &data, const index_t rows, const index_t cols, std::fstream &file)
template<typename ViewType, typename Comparator>
KOKKOS_INLINE_FUNCTION auto PACMAN::RbfPum::RbfPumMinMax (const ViewType &v, const Comparator &op)
 A reimplementation of Kokkos::MinMax which works on any backend.

Macro Definition Documentation

◆ SEND_TO_HOST

#define SEND_TO_HOST ( view)
Value:
auto h_##view = Kokkos::create_mirror_view_and_copy( \
Kokkos::DefaultHostExecutionSpace{}, view)

Definition at line 23 of file utils.hpp.