Compute Library
ICpuKernel< Derived > Class Template Reference

#include <ICpuKernel.h>

Collaboration diagram for ICpuKernel< Derived >:

Static Public Member Functions

template<typename SelectorType >
static const auto * get_implementation (const SelectorType &selector, KernelSelectionType selection_type=KernelSelectionType::Supported)
 Micro-kernel selector. More...

Additional Inherited Members

- Public Member Functions inherited from ICPPKernel
virtual ~ICPPKernel ()=default
 Default destructor. More...
virtual void run (const Window &window, const ThreadInfo &info)
 Execute the kernel on the passed window. More...
virtual void run_nd (const Window &window, const ThreadInfo &info, const Window &thread_locator)
 legacy compatibility layer for implemantions which do not support thread_locator In these cases we simply narrow the interface down the legacy version More...
virtual void run_op (ITensorPack &tensors, const Window &window, const ThreadInfo &info)
 Execute the kernel on the passed window. More...
virtual size_t get_mws (const CPUInfo &platform, size_t thread_count) const
 Return minimum workload size of the relevant kernel. More...
virtual const char * name () const =0
 Name of the kernel. More...
- Public Member Functions inherited from IKernel
 IKernel ()
 Constructor. More...
virtual ~IKernel ()=default
 Destructor. More...
virtual bool is_parallelisable () const
 Indicates whether or not the kernel is parallelisable. More...
virtual BorderSize border_size () const
 The size of the border for that kernel. More...
const Windowwindow () const
 The maximum window the kernel can be executed on. More...
bool is_window_configured () const
 Function to check if the embedded window of this kernel has been configured. More...
- Static Public Attributes inherited from ICPPKernel
static constexpr size_t default_mws = 1

Detailed Description

template<class Derived>
class arm_compute::cpu::ICpuKernel< Derived >

Definition at line 41 of file ICpuKernel.h.

Member Function Documentation

◆ get_implementation()

static const auto* get_implementation ( const SelectorType &  selector,
KernelSelectionType  selection_type = KernelSelectionType::Supported 

Micro-kernel selector.

[in]selectorSelection struct passed including information to help pick the appropriate micro-kernel
[in]selection_type(Optional) Decides whether to get the best implementation for the given hardware or for the given build
A matching micro-kernel else nullptr

Definition at line 53 of file ICpuKernel.h.

54  {
55  using kernel_type = typename std::remove_reference<decltype(Derived::get_available_kernels())>::type::value_type;
57  for(const auto &uk : Derived::get_available_kernels())
58  {
59  if(uk.is_selected(selector) && (selection_type == KernelSelectionType::Preferred || uk.ukernel != nullptr))
60  {
61  return &uk;
62  }
63  }
65  return static_cast<kernel_type *>(nullptr);
66  }

The documentation for this class was generated from the following file:
@ Preferred
Retrieve the best implementation available for the given Cpu ISA, ignoring the build flags.