bufferkdtree (C sources)
C source code for the Python bufferkdtree implementation
|
#include "include/gpu_opencl.h"
#include "include/base.h"
#include "include/util.h"
#include "include/global.h"
Functions | |
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) |
void fit_gpu | ( | FLOAT_TYPE * | X, |
int | nX, | ||
int | dX, | ||
BRUTE_RECORD * | brute_record, | ||
BRUTE_PARAMETERS * | params | ||
) |
Fits a model given the training data (and 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 |
void free_resources_gpu | ( | BRUTE_RECORD * | brute_record, |
BRUTE_PARAMETERS * | params | ||
) |
Does some clean up (before exiting the program).
*brute_record | Pointer to struct containing the model |
*params | Pointer to struct containing the parameters |
void init_gpu | ( | BRUTE_RECORD * | brute_record, |
BRUTE_PARAMETERS * | params | ||
) |
Initializes components if needed.
*brute_record | Pointer to struct containing the model |
*params | Pointer to struct containing the parameters |
void neighbors_gpu | ( | FLOAT_TYPE * | Xtest, |
int | nXtest, | ||
int | dXtest, | ||
FLOAT_TYPE * | d_mins, | ||
int * | idx_mins, | ||
BRUTE_RECORD * | brute_record, | ||
BRUTE_PARAMETERS * | params | ||
) |
Computes the predictions (for test patterns)
*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 |