PandA-2024.02
|
#include "digitrec_sw.h"
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 |
#define NTESTS 4 |
Definition at line 86 of file digitrec_sw.c.
Referenced by 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().
LabelType knn_vote | ( | int | labels[K_CONST] | ) |
Definition at line 62 of file digitrec_sw.c.
References K_CONST.
Referenced by DigitRec_sw().
int popcount | ( | DigitType | x | ) |
Definition at line 18 of file digitrec_sw.c.
Referenced by 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().
const unsigned long long m1 = 0x5555555555555555 |
Definition at line 12 of file digitrec_sw.c.
Referenced by bbgemm(), gemm(), and popcount().
const unsigned long long m2 = 0x3333333333333333 |
Definition at line 13 of file digitrec_sw.c.
Referenced by bbgemm(), gemm(), and popcount().
const unsigned long long m4 = 0x0f0f0f0f0f0f0f0f |
Definition at line 14 of file digitrec_sw.c.
Referenced by popcount().