#include <stdlib.h>
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <time.h>
#include <pthread.h>
#include <string.h>
#include <sched.h>
#include <omp.h>
#include "util.h"
#include "global.h"
#include "../../../include/opencl.h"
#include "../../../include/util.h"
#include "../../../include/float.h"
Go to the source code of this file.
|
void | init_gpu (BRUTE_RECORD *brute_record, BRUTE_PARAMETERS *params) |
|
void | fit_gpu (FLOAT_TYPE *X, int nX, int dX, BRUTE_RECORD *brute_record, BRUTE_PARAMETERS *params) |
|
void | free_resources_gpu (BRUTE_RECORD *brute_record, BRUTE_PARAMETERS *params) |
|
void | neighbors_gpu (FLOAT_TYPE *Xtest, int nXtest, int dXtest, FLOAT_TYPE *d_mins, int *idx_mins, BRUTE_RECORD *brute_record, BRUTE_PARAMETERS *params) |
|
#define STR_HELPER |
( |
|
x | ) |
#x |
#define WORKGROUP_SIZE 256 |
Fits a model given the training data (and parameters)
- Parameters
-
*X | Array containing the training patterns |
nX | Number of patterns |
dX | Dimensionality of patterns |
*brute_record | Pointer to struct containing the model |
*params | Pointer to struct containing the parameters |
Does some clean up (before exiting the program).
- Parameters
-
*brute_record | Pointer to struct containing the model |
*params | Pointer to struct containing the parameters |
Initializes components if needed.
- Parameters
-
*brute_record | Pointer to struct containing the model |
*params | Pointer to struct containing the parameters |
Computes the predictions (for test patterns)
- Parameters
-
*Xtest | Array of test patterns |
nXest | Number of test patterns |
dXtest | Dimensionality of test patterns |
*d_mins | Array to store all distances |
*idx_mins | Array for storing all indices |
*brute_record | Pointer to struct containing the model |
*params | Pointer to struct containing the parameters |