24#ifndef MORPHEUS_IMPL_DIA_UTILS_IMPL_HPP
25#define MORPHEUS_IMPL_DIA_UTILS_IMPL_HPP
27#include <Morpheus_Macros.hpp>
34MORPHEUS_INLINE_FUNCTION
const T get_pad_size(T len, T alignment) {
35 return alignment * ((len + alignment - 1) / alignment);
48bool exceeds_tolerance(
const T num_rows,
const T num_entries,
49 const T num_diagonals) {
50 const float max_fill = 10.0;
51 const float threshold = 100e6;
52 const float size = float(num_diagonals) * float(num_rows);
53 const float fill_ratio = size / std::max(1.0f,
float(num_entries));
56 if (fill_ratio > max_fill && size > threshold) {
Generic Morpheus interfaces.
Definition: dummy.cpp:24