bufferkdtree (C sources)
C source code for the Python bufferkdtree implementation
 All Classes Files Functions Variables Typedefs Macros
Functions
gpu_opencl.c File Reference
#include "include/gpu_opencl.h"
#include "include/base.h"
#include "include/util.h"
#include "include/global.h"
Include dependency graph for gpu_opencl.c:

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)
 

Function Documentation

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)

Parameters
*XArray containing the training patterns
nXNumber of patterns
dXDimensionality of patterns
*brute_recordPointer to struct containing the model
*paramsPointer to struct containing the parameters
void free_resources_gpu ( BRUTE_RECORD brute_record,
BRUTE_PARAMETERS params 
)

Does some clean up (before exiting the program).

Parameters
*brute_recordPointer to struct containing the model
*paramsPointer to struct containing the parameters
void init_gpu ( BRUTE_RECORD brute_record,
BRUTE_PARAMETERS params 
)

Initializes components if needed.

Parameters
*brute_recordPointer to struct containing the model
*paramsPointer 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)

Parameters
*XtestArray of test patterns
nXestNumber of test patterns
dXtestDimensionality of test patterns
*d_minsArray to store all distances
*idx_minsArray for storing all indices
*brute_recordPointer to struct containing the model
*paramsPointer to struct containing the parameters