pulsatrix
Loading...
Searching...
No Matches
top_k.hpp File Reference

Top-k selection along a tensor's last dimension, on any device (roadmap FND-3). More...

#include <cstdint>
#include "pulsatrix/tensor.hpp"
Include dependency graph for top_k.hpp:

Go to the source code of this file.

Classes

struct  pulsatrix::TopKResult
 top_k()'s result: the selected values and their positions along the last dimension. More...
 

Namespaces

namespace  pulsatrix
 

Functions

TopKResult pulsatrix::top_k (const Tensor &input, int64_t k, bool largest=true)
 Selects the k largest (or smallest) entries of every row along the last dimension.
 

Detailed Description

Top-k selection along a tensor's last dimension, on any device (roadmap FND-3).