ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnfw::cker::gemm_support::GemmContext Struct Reference

#include <GEMMSupport.h>

Public Member Functions

 GemmContext ()
 

Static Public Member Functions

static GemmContextGetGemmLowpContext ()
 

Data Fields

std::unique_ptr< gemmlowp::GemmContext > gemm_context
 

Static Public Attributes

static constexpr int default_num_threadpool_threads = 4
 

Detailed Description

Definition at line 33 of file GEMMSupport.h.

Constructor & Destructor Documentation

◆ GemmContext()

nnfw::cker::gemm_support::GemmContext::GemmContext ( )
inline

Definition at line 38 of file GEMMSupport.h.

39 {
40 int num_threads = std::thread::hardware_concurrency() / 2;
41 if (num_threads == 0)
42 {
44 }
45
46 gemm_context.reset(new gemmlowp::GemmContext());
47 gemm_context->set_max_num_threads(num_threads);
48 }
static constexpr int default_num_threadpool_threads
Definition GEMMSupport.h:36
std::unique_ptr< gemmlowp::GemmContext > gemm_context
Definition GEMMSupport.h:35

References default_num_threadpool_threads, and gemm_context.

Member Function Documentation

◆ GetGemmLowpContext()

static GemmContext & nnfw::cker::gemm_support::GemmContext::GetGemmLowpContext ( )
inlinestatic

Definition at line 50 of file GEMMSupport.h.

51 {
52 static GemmContext instance;
53 return instance;
54 }

Referenced by nnfw::cker::gemm_support::GetGemmLowpContext().

Field Documentation

◆ default_num_threadpool_threads

constexpr int nnfw::cker::gemm_support::GemmContext::default_num_threadpool_threads = 4
staticconstexpr

Definition at line 36 of file GEMMSupport.h.

Referenced by GemmContext().

◆ gemm_context

std::unique_ptr<gemmlowp::GemmContext> nnfw::cker::gemm_support::GemmContext::gemm_context

Definition at line 35 of file GEMMSupport.h.

Referenced by GemmContext().


The documentation for this struct was generated from the following file: