CLUtils  0.2.1
 Hosted by GitHub
Functions | Variables
tests.cpp File Reference

Google Test Unit Tests. More...

#include <iostream>
#include <vector>
#include <chrono>
#include <random>
#include <cmath>
#include <thread>
#include <gtest/gtest.h>
#include <CLUtils.hpp>
Include dependency graph for tests.cpp:

Functions

std::default_random_engine generator (seed)
 
std::uniform_int_distribution< int > distribution (1, 32)
 
 TEST (CLEnv, BasicFunctionality)
 Performs a buffer initialization under default environment.
 
 TEST (CLEnv, AddMoreCLObjects)
 Performs a buffer initializations and a vector addition under user created environment.
 
 TEST (ProfilingInfo, BasicFunctionality)
 Tests functionality on 2 vectors of 10 floats and compares them.
 
 TEST (CPUTimer, BasicFunctionality)
 Tests functionality on a 100,000 us interval.
 
 TEST (GPUTimer, BasicFunctionality)
 Tests functionality on a ~12 us execution time kernel.
 
int main (int argc, char **argv)
 

Variables

const std::string kernel_filename { "kernels/kernels.cl" }
 
const std::string kernel_filename2 { "kernels/kernels2.cl" }
 
const std::vector< std::string > kernel_filenames { kernel_filename, kernel_filename2 }
 
const int n_elements = 1 << 12
 
auto seed = std::chrono::system_clock::now ().time_since_epoch ().count ()
 
auto rNum = std::bind (distribution, generator)
 

Detailed Description

Google Test Unit Tests.

Author
Nick Lamprianidis
Version
0.2.1
Date
2014-2015
Copyright (c) 2014 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.

Variable Documentation

auto rNum = std::bind (distribution, generator)

Produces a random integer with which device buffers will be initialized