GuidedFilter  1.2.0
 Hosted by GitHub
Namespaces | Functions | Variables
testsBoxFilter.cpp File Reference

Google Test Unit Tests for the Box Filtering kernels. More...

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

Namespaces

 GF
 

Functions

 TEST (BoxFilter, scan)
 Tests the scan kernel. More...
 
 TEST (BoxFilter, transpose)
 Tests the transpose kernel. More...
 
 TEST (BoxFilter, sat)
 Tests the construction of a Summed Area Table (SAT). More...
 
 TEST (BoxFilter, boxFilterSAT)
 Tests the boxFilterSAT kernel. More...
 
 TEST (BoxFilter, boxFilter)
 Tests the boxFilter kernel. More...
 
int main (int argc, char **argv)
 

Variables

const std::string kernel_filename_scan { "kernels/scan_kernels.cl" }
 
const std::string kernel_filename_tr { "kernels/transpose_kernels.cl" }
 
const std::string kernel_filename_box { "kernels/boxFilter_kernels.cl" }
 
bool profiling
 

Detailed Description

Google Test Unit Tests for the Box Filtering kernels.

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.0
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 ( BoxFilter  ,
scan   
)

Tests the scan kernel.

The operation is a scan on the rows of an array.

TEST ( BoxFilter  ,
transpose   
)

Tests the transpose kernel.

The operation is a matrix transposition.

TEST ( BoxFilter  ,
sat   
)

Tests the construction of a Summed Area Table (SAT).

The operations performed are a scan on the rows of an array, an array transposition, and then a scan on the columns of the array.

TEST ( BoxFilter  ,
boxFilterSAT   
)

Tests the boxFilterSAT kernel.

The operation is a blurring effect (mean filtering) on an image, using SAT arrays.

TEST ( BoxFilter  ,
boxFilter   
)

Tests the boxFilter kernel.

The operation is a blurring effect (mean filtering) on an image.

Variable Documentation

const std::string kernel_filename_box { "kernels/boxFilter_kernels.cl" }
const std::string kernel_filename_scan { "kernels/scan_kernels.cl" }
const std::string kernel_filename_tr { "kernels/transpose_kernels.cl" }
bool profiling