PandA-2024.02
Macros | Functions | Variables
digitrec_sw.c File Reference
#include "digitrec_sw.h"
Include dependency graph for digitrec_sw.c:

Go to the source code of this file.

Macros

#define NTESTS   4
 

Functions

int popcount (DigitType x)
 
void update_knn (const DigitType *train_inst, const DigitType *test_inst, int dists[K_CONST], int labels[K_CONST], int label)
 
LabelType knn_vote (int labels[K_CONST])
 
void DigitRec_sw (const DigitType global_training_set[NUM_TRAINING *DIGIT_WIDTH], const DigitType global_test_set[NUM_TEST *DIGIT_WIDTH], LabelType global_results[NUM_TEST])
 

Variables

const unsigned long long m1 = 0x5555555555555555
 
const unsigned long long m2 = 0x3333333333333333
 
const unsigned long long m4 = 0x0f0f0f0f0f0f0f0f
 

Macro Definition Documentation

◆ NTESTS

#define NTESTS   4

Definition at line 86 of file digitrec_sw.c.

Referenced by DigitRec_sw().

Function Documentation

◆ DigitRec_sw()

void DigitRec_sw ( const DigitType  global_training_set[NUM_TRAINING *DIGIT_WIDTH],
const DigitType  global_test_set[NUM_TEST *DIGIT_WIDTH],
LabelType  global_results[NUM_TEST] 
)

Definition at line 90 of file digitrec_sw.c.

References CLASS_SIZE, point_stats::dists, K_CONST, knn_vote(), NTESTS, NUM_TRAINING, and update_knn().

Here is the call graph for this function:

◆ knn_vote()

LabelType knn_vote ( int  labels[K_CONST])

Definition at line 62 of file digitrec_sw.c.

References K_CONST.

Referenced by DigitRec_sw().

Here is the caller graph for this function:

◆ popcount()

int popcount ( DigitType  x)

Definition at line 18 of file digitrec_sw.c.

References m1, m2, and m4.

Referenced by update_knn().

Here is the caller graph for this function:

◆ update_knn()

void update_knn ( const DigitType train_inst,
const DigitType test_inst,
int  dists[K_CONST],
int  labels[K_CONST],
int  label 
)

Definition at line 29 of file digitrec_sw.c.

References DIGIT_WIDTH, point_stats::dists, k, K_CONST, and popcount().

Referenced by DigitRec_sw().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ m1

const unsigned long long m1 = 0x5555555555555555

Definition at line 12 of file digitrec_sw.c.

Referenced by bbgemm(), gemm(), and popcount().

◆ m2

const unsigned long long m2 = 0x3333333333333333

Definition at line 13 of file digitrec_sw.c.

Referenced by bbgemm(), gemm(), and popcount().

◆ m4

const unsigned long long m4 = 0x0f0f0f0f0f0f0f0f

Definition at line 14 of file digitrec_sw.c.

Referenced by popcount().


Generated on Mon Feb 12 2024 13:03:12 for PandA-2024.02 by doxygen 1.8.13