RandomBallCover  1.2.1
 Hosted by GitHub
Namespaces | Functions | Variables
testsRBC.cpp File Reference

Google Test Unit Tests for the kernels associated with the Random Ball Cover data structure. More...

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <numeric>
#include <chrono>
#include <random>
#include <limits>
#include <cmath>
#include <gtest/gtest.h>
#include <CLUtils.hpp>
#include <RBC/algorithms.hpp>
#include <RBC/tests/helper_funcs.hpp>
Include dependency graph for testsRBC.cpp:

Namespaces

 RBC
 

Functions

 TEST (RBC, rbcComputeDists)
 Tests the rbcComputeDists_{ShareNone,SharedR,SharedXR} kernel. More...
 
 TEST (RBC, rbcComputeDists_Kinect)
 Tests the rbcComputeDists_Kinect kernel. More...
 
 TEST (RBC, rbcMinDists)
 Tests the rbcMinDists kernel. More...
 
 TEST (RBC, rbcGroupMinDists)
 Tests the rbcGroupMinDists kernel. More...
 
 TEST (RBC, rbcPermute)
 Tests the rbcPermute kernel. More...
 
 TEST (RBC, rbcPermute_Kinect)
 Tests the rbcPermute_Kinect kernel. More...
 
 TEST (RBC, rbcConstruct)
 Tests the RBCConstruct class. More...
 
 TEST (RBC, rbcSearch)
 Tests the RBCSearch class. More...
 
int main (int argc, char **argv)
 

Variables

bool profiling
 
const std::string kernel_filename_rbc { "kernels/rbc_kernels.cl" }
 
const std::string kernel_filename_scan { "kernels/scan_kernels.cl" }
 
const std::string kernel_filename_reduce { "kernels/reduce_kernels.cl" }
 
std::default_random_engine generator { 1234ul }
 
std::uniform_real_distribution< float > distributionR1 { 0.f, 1.f }
 
std::function< float()> rNum_R_0_1_ = std::bind (distributionR1, generator)
 

Detailed Description

Google Test Unit Tests for the kernels associated with the Random Ball Cover data structure.

Note
Use the --profiling flag to enable profiling of the kernels.
The benchmarks in these tests are against naive CPU implementations of the associated algorithms. They are used only for testing purposes, and not for examining the performance of their GPU alternatives.
Author
Nick Lamprianidis
Version
1.2.1
Date
2015
Copyright (c) 2015 Nick Lamprianidis
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Function Documentation

int main ( int  argc,
char **  argv 
)
TEST ( RBC  ,
rbcComputeDists   
)

Tests the rbcComputeDists_{ShareNone,SharedR,SharedXR} kernel.

The kernel computes the distances between the points of two sets.

TEST ( RBC  ,
rbcComputeDists_Kinect   
)

Tests the rbcComputeDists_Kinect kernel.

The kernel computes the distances between the points of two sets of Kinect 8-D data.

TEST ( RBC  ,
rbcMinDists   
)

Tests the rbcMinDists kernel.

The kernel computes the minimum element of each row of an array.

TEST ( RBC  ,
rbcGroupMinDists   
)

Tests the rbcGroupMinDists kernel.

The kernel computes the minimum element of each row of an array.

TEST ( RBC  ,
rbcPermute   
)

Tests the rbcPermute kernel.

The kernel permutes the database points to form the representative lists.

TEST ( RBC  ,
rbcPermute_Kinect   
)

Tests the rbcPermute_Kinect kernel.

The kernel permutes the database points to form the representative lists.

TEST ( RBC  ,
rbcConstruct   
)

Tests the RBCConstruct class.

The class constructs the representative lists.

TEST ( RBC  ,
rbcSearch   
)

Tests the RBCSearch class.

The class computes the NNs of a set of queries.

Variable Documentation

std::uniform_real_distribution<float> distributionR1 { 0.f, 1.f }
std::default_random_engine generator { 1234ul }
const std::string kernel_filename_rbc { "kernels/rbc_kernels.cl" }
const std::string kernel_filename_reduce { "kernels/reduce_kernels.cl" }
const std::string kernel_filename_scan { "kernels/scan_kernels.cl" }
bool profiling
std::function<float ()> rNum_R_0_1_ = std::bind (distributionR1, generator)