Disabled external gits

This commit is contained in:
2022-04-07 18:46:57 +02:00
parent 88cb3426ad
commit 15e7120d6d
5316 changed files with 4563444 additions and 6 deletions

View File

@@ -0,0 +1,55 @@
# Copyright (c) 2005-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Common Makefile that builds and runs example.
# Just specify your program basename
PROG=stereo
ARGS=
PERF_RUN_ARGS=
# Trying to find if icl.exe is set
CXX1 = $(TBB_CXX)-
CXX2 = $(CXX1:icl.exe-=icl.exe)
CXX = $(CXX2:-=cl.exe)
# TBB libs
TBBLIB=tbb.lib
TBBLIB_DEBUG=tbb_debug.lib
# OpenCL lib
OPENCL_LIB=OpenCL.lib
# The C++ compiler options
MYCXXFLAGS=/TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_SECURE_NO_WARNINGS /D _SCL_SECURE_NO_WARNINGS $(CXXFLAGS)
MYLDFLAGS=/INCREMENTAL:NO /NOLOGO /DEBUG $(LDFLAGS)
all: release test
release:
$(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link $(TBBLIB) $(OPENCL_LIB) $(MYLDFLAGS) /OUT:$(PROG).exe
debug:
$(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link $(TBBLIB_DEBUG) $(OPENCL_LIB) $(MYLDFLAGS) /OUT:$(PROG).exe
profile:
$(CXX) *.cpp /MD /O2 /Zi /D NDEBUG $(MYCXXFLAGS) /D TBB_USE_THREADING_TOOLS /link $(TBBLIB) $(OPENCL_LIB) $(MYLDFLAGS) /OUT:$(PROG).exe
clean:
@cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
test:
$(PROG) $(ARGS)
compiler_check:
@$(CXX) >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly"
perf_build: release
perf_run:
$(PROG) $(PERF_RUN_ARGS)

View File

@@ -0,0 +1,52 @@
/*
Copyright (c) 2005-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
__constant int redChannelOffset = 0;
__constant int greenChannelOffset = 1;
__constant int blueChannelOffset = 2;
__constant int channelsPerPixel = 4;
__constant uint channelIncreaseValue = 10;
__kernel void mergeImages( __global uchar* bufferLeft, __global uchar* bufferRight, uint width) {
const int indexWidth = get_global_id(0);
const int indexHeight = get_global_id(1);
const int pixelIndex = channelsPerPixel * width * indexHeight + channelsPerPixel * indexWidth;
const int pixelGreenChannelIndex = pixelIndex + greenChannelOffset;
const int pixelBlueChannelIndex = pixelIndex + blueChannelOffset;
bufferLeft[pixelGreenChannelIndex] = (bufferRight[pixelGreenChannelIndex] + bufferLeft[pixelGreenChannelIndex]) / 2;
bufferLeft[pixelBlueChannelIndex] = bufferRight[pixelBlueChannelIndex];
}
__kernel void applyLeftImageEffect( __global uchar* bufferLeft, uint width) {
const int indexWidth = get_global_id(0);
const int indexHeight = get_global_id(1);
const int pixelRedChannelIndex = channelsPerPixel * width * indexHeight + channelsPerPixel * indexWidth + redChannelOffset;
bufferLeft[pixelRedChannelIndex] = convert_uchar_sat(bufferLeft[pixelRedChannelIndex] + channelIncreaseValue);
}
__kernel void applyRightImageEffect( __global uchar* bufferRight, uint width) {
const int indexWidth = get_global_id(0);
const int indexHeight = get_global_id(1);
const int pixelBlueChannelIndex = channelsPerPixel * width * indexHeight + channelsPerPixel * indexWidth + blueChannelOffset;
bufferRight[pixelBlueChannelIndex] = convert_uchar_sat(bufferRight[pixelBlueChannelIndex] + channelIncreaseValue);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,445 @@
<!DOCTYPE html>
<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<head>
<meta charset="UTF-8">
<style>
::selection {
background: #b7ffb7;
}
::-moz-selection {
background: #b7ffb7;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
width: 800px;
margin: 0 auto;
}
#banner {
/* Div for banner */
float:left;
margin: 0px;
margin-bottom: 10px;
width: 100%;
background-color: #0071C5;
z-index: 0;
}
#banner .logo {
/* Apply to logo in banner. Add as class to image tag. */
float: left;
margin-right: 20px;
margin-left: 20px;
margin-top: 15px;
padding-bottom: 5px;
}
h1 {
text-align: center;
font-size: 36px;
}
h1.title {
/* Add as class to H1 in banner */
font-family: "Intel Clear", Verdana, Arial, sans-serif;
font-weight:normal;
color: #FFFFFF;
font-size: 170%;
margin-right: 40px;
margin-left: 40px;
padding-right: 20px;
text-indent: 20px;
}
.h3-alike {
display:inline;
font-size: 1.17em;
font-weight: bold;
color: #0071C5;
}
h3 {
font-size: 1.17em;
font-weight: bold;
color: #0071C5;
}
.h4-alike {
display:inline;
font-size: 1.05em;
font-weight: bold;
}
pre {
font-family: "Consolas", Monaco, monospace;
font-size:small;
background: #fafafa;
margin: 0;
padding-left:20px;
}
#footer {
font-size: small;
}
code {
font-family: "Consolas", Monaco, monospace;
}
.code-block
{
padding-left:20px;
}
.changes {
margin: 1em 0;
}
.changes input:active {
position: relative;
top: 1px;
}
.changes input:hover:after {
padding-left: 16px;
font-size: 10px;
content: 'More';
}
.changes input:checked:hover:after {
content: 'Less';
}
.changes input + .show-hide {
display: none;
}
.changes input:checked + .show-hide {
display: block;
}
ul {
margin: 0;
padding: 0.5em 0 0.5em 2.5em;
}
ul li {
margin-bottom: 3px;
}
ul li:last-child {
margin-bottom: 0;
}
.disc {
list-style-type:disc
}
.circ {
list-style-type:circle
}
.single {
padding: 0 0.5em;
}
/* ------------------------------------------------- */
/* Table styles */
table{
margin-bottom:5pt;
border-collapse:collapse;
margin-left:0px;
margin-top:0.3em;
font-size:10pt;
}
tr{
vertical-align:top;
}
th,
th h3{
padding:4px;
text-align:left;
background-color:#0071C5;
font-weight:bold;
margin-top:1px;
margin-bottom:0;
color:#FFFFFF;
font-size:10pt;
vertical-align:middle;
}
th{
border:1px #dddddd solid;
padding-top:2px;
padding-bottom:0px;
padding-right:3px;
padding-left:3px;
}
td{
border:1px #dddddd solid;
vertical-align:top;
font-size:100%;
text-align:left;
margin-bottom:0;
}
td,
td p{
margin-top:0;
margin-left:0;
text-align:left;
font-size:inherit;
line-height:120%;
}
td p{
margin-bottom:0;
padding-top:5px;
padding-bottom:5px;
padding-right:5px;
padding-left:1px;
}
.noborder{
border:0px none;
}
.noborder1stcol{
border:0px none;
padding-left:0pt;
}
td ol{
font-size:inherit;
margin-left:28px;
}
td ul{
font-size:inherit;
margin-left:24px;
}
.DefListTbl{
width:90%;
margin-left:-3pt;
}
.syntaxdiagramtbl{
margin-left:-3pt;
}
.sdtbl{
}
.sdrow{
}
.sdtblp{
border:0px none;
font-size:inherit;
line-height:120%;
margin-bottom:0;
padding-bottom:0px;
padding-top:5px;
padding-left:0px;
padding-right:5px;
vertical-align:top;
}
.idepara, .ide_para{
border:0px none;
font-size:inherit;
line-height:120%;
margin-bottom:0;
padding-bottom:0px;
padding-top:5px;
padding-left:0px;
padding-right:5px;
vertical-align:top;
}
.specs {
border-collapse:collapse;
}
.specs td, .specs th {
font-size: 14px;
}
.specs td {
border: 1px solid black;
}
.specs td td, .specs td th {
border: none;
}
.specs td, .specs td td, .specs td th {
padding: 0 0.2em 0.2em;
text-align: center;
}
.specs td tr:last-child td,
.specs td tr:last-child th {
padding: 0 0.2em;
}
.serial-time {
}
.modified-time {
width: 6.5em;
}
.compiler {
}
.comp-opt {
}
.sys-specs {
width: 18em;
}
.note {
font-size:small;
font-style: italic;
}
</style>
<title>Intel&reg; Threading Building Blocks. Stereo sample</title>
</head>
<body>
<div id="banner">
<img class="logo" src="data:image/png;base64,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
9Or1LzUmVVz+HJXDAAAAAElFTkSuQmCC">
<h1 class="title">Intel&reg; Threading Building Blocks.<br>Stereo sample</h1>
</div>
<p>
The Stereo example is an implementation of the algorithm that applies stereoscopic 3D effect on two input images and achieved by means of encoding each eye's image using filters of different colors: red and blue -
<a href="http://en.wikipedia.org/wiki/Anaglyph_3D"><i>Anaglyph effect</i></a>.
<br><br>
The example uses the flow graph interface and can be executed both on CPU and GPU for image processing.
The output of this application is a PNG image with the anaglyph effect applied.
<br><br>
<i>
This example includes software developed by Lode Vandevenne. See
<a href="#copyright">here</a> for copyright information.
</i>
<br>
It exemplifies the opencl_node usage in the flow graph interface in context of creating a stereo image from two input images.
<br><br>
This example uses C++11 lambda expressions. Specifying a compiler option such as -std=c++11 or similar might be necessary in order to build the example.
For more information please refer to the documentation for the compiler you use.
</p>
<div class="changes">
<div class="h3-alike">System Requirements</div>
<input type="checkbox">
<div class="show-hide">
<p>
For the most up to date system requirements, see the <a href="http://software.intel.com/en-us/articles/intel-threading-building-blocks-release-notes">release notes.</a>
</p>
<p>
Additionally, you have to install OpenCL&trade; version 1.2 or higher in order to run this example. See the <a href="https://software.intel.com/en-us/articles/opencl-drivers">OpenCL&trade; Drivers and Runtimes for Intel&reg; Architecture</a>.
</p>
</div>
</div>
<div class="changes">
<div class="h3-alike">Files</div>
<input type="checkbox" checked="checked">
<div class="show-hide">
<dl>
<dt><a href="stereo.cpp">stereo.cpp</a>
<dd>The implementation of stereo image creation algorithm based on the flow graph interface.
<dt><a href="lodepng.cpp">lodepng.cpp</a>
<dd>Library for reading and writing png images.
<dt><a href="lodepng.h">lodepng.h</a>
<dd>Public header file for the lodepng library.
<dt><a href="utils.h">utils.h</a>
<dd>Support functions for this example.
<dt><a href="imageEffects.cl">imageEffects.cl</a>
<dd>OpenCL kernel file with image effects algorithms.
<dt><a href="Makefile">Makefile</a>
<dd>Makefile for building the example.
</dl>
</div>
</div>
<div class="changes">
<div class="h3-alike">Directories</div>
<input type="checkbox" checked="checked">
<div class="show-hide">
<dl>
<dt><a href="msvs/">msvs</a>
<dd>Contains Microsoft* Visual Studio* workspace for building and running the example (Windows* systems only).
<dt><a href="xcode/">xcode</a>
<dd>Contains Xcode* IDE workspace for building and running the example (macOS* systems only).
</dl>
<p>For information about the minimum supported version of IDE, see <a href="http://software.intel.com/en-us/articles/intel-threading-building-blocks-release-notes">release notes.</a></p>
</div>
</div>
<div class="changes">
<div class="h3-alike">Build instructions</div>
<input type="checkbox" checked="checked">
<div class="show-hide">
<p>General build directions can be found <a href="../../index.html">here</a>.</p>
</div>
</div>
<div class="changes">
<div class="h3-alike">Usage</div>
<input type="checkbox" checked="checked">
<div class="show-hide">
<dl>
<dt><tt>stereo <i>-h</i></tt>
<dd>Prints the help for command line options
<dt><tt>stereo [<i>-v</i>] [<i>-alg</i>=value] [<i>first_filename</i>] [<i>second_filename</i>]</tt>
<dd><i>-v</i> print diagnostic output to screen<br>
<i>-alg</i> name of the used pipeline realization - can be host, target (default) or host_target<br>
<i>first_filename</i> first input file name<br>
<i>second_filename</i> second input file name<br>
</dl>
</div>
</div>
<br>
<a href="../index.html">Up to parent directory</a>
<hr>
<a name="copyright"></a>
<div class="changes">
<div class="h3-alike">Legal Information</div>
<input type="checkbox">
<div class="show-hide">
<p>
Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.
<br>* Other names and brands may be claimed as the property of others.
<br>&copy; 2020, Intel Corporation
</p>
<p>
LodePNG version 20160409
Copyright (c) 2005-2016 Lode Vandevenne
</p>
<p>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
<br>
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
<ol>
<li>The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
<li>Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
<li>This notice may not be removed or altered from any source
distribution.
</ol>
</p>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,437 @@
/*
Copyright (c) 2005-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#define TBB_PREVIEW_FLOW_GRAPH_NODES 1
#define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1
#include "tbb/tbb_config.h"
#include "../../common/utility/utility.h"
#if __TBB_PREVIEW_OPENCL_NODE && __TBB_CPP11_LAMBDAS_PRESENT
#if _MSC_VER
// suppress warning C4503: decorated name length exceeded, name was truncated
#pragma warning(disable : 4503)
#endif
#include <iostream>
#include "tbb/flow_graph.h"
#include "tbb/flow_graph_opencl_node.h"
#include "tbb/tick_count.h"
#include "utils.h"
static const int redChannelOffset = 0;
static const int greenChannelOffset = 1;
static const int blueChannelOffset = 2;
static const int channelsPerPixel = 4;
static const unsigned int channelIncreaseValue = 10;
void applyLeftImageEffect(utils::image_buffer& image) {
const int heighBase = channelsPerPixel * image.width;
std::vector<unsigned char>& buffer = *image.buffer;
// Increase the Red channel of left image by 10
for (unsigned int y = 0; y < image.height; y++) {
const int heightOffset = heighBase * y;
for (unsigned int x = 0; x < image.width; x++) {
int pixelOffset = heightOffset + channelsPerPixel * x + redChannelOffset;
unsigned int pixelValue = buffer[pixelOffset] + channelIncreaseValue;
buffer[pixelOffset] = utils::convert_uchar_sat(pixelValue);
}
}
}
void applyRightImageEffect(utils::image_buffer& image) {
const int heighBase = channelsPerPixel * image.width;
std::vector<unsigned char>& buffer = *image.buffer;
// Increase the Blue channel of left image by 10
for (unsigned int y = 0; y < image.height; y++) {
const int heightOffset = heighBase * y;
for (unsigned int x = 0; x < image.width; x++) {
const int pixelOffset = heightOffset + channelsPerPixel * x + blueChannelOffset;
unsigned int pixelValue = buffer[pixelOffset] + channelIncreaseValue;
buffer[pixelOffset] = utils::convert_uchar_sat(pixelValue);
}
}
}
// This function merges to image buffers into the first buffer (leftImageBuffer as a destination)
void mergeImageBuffers(utils::image_buffer& leftImage, const utils::image_buffer& rightImage) {
const int heighBase = channelsPerPixel * leftImage.width;
std::vector<unsigned char>& leftImageBuffer = *leftImage.buffer;
std::vector<unsigned char>& rightImageBuffer = *rightImage.buffer;
// Apply stereoscopic merge using algorithm: R: left image, G: left and right images (middle value), B: right image
for (unsigned int y = 0; y < leftImage.height; y++) {
const int heightOffset = heighBase * y;
for (unsigned int x = 0; x < leftImage.width; x++) {
const int pixelOffset = heightOffset + channelsPerPixel * x;
const int greenChannelIndex = pixelOffset + greenChannelOffset;
const int blueChannelIndex = pixelOffset + blueChannelOffset;
const int middleGreenChannel = (leftImageBuffer[greenChannelIndex] + rightImageBuffer[greenChannelIndex]);
leftImageBuffer[greenChannelIndex] = middleGreenChannel / 2;
leftImageBuffer[blueChannelIndex] = rightImageBuffer[blueChannelIndex];
}
}
}
void fillOpenclBuffer(tbb::flow::opencl_buffer<cl_uchar>& openclBuffer, const std::vector<unsigned char>& sourceBuffer) {
std::copy(sourceBuffer.begin(), sourceBuffer.end(), openclBuffer.begin());
}
class gpu_device_selector {
public:
template <typename DeviceFilter>
tbb::flow::opencl_device operator()(tbb::flow::opencl_factory<DeviceFilter>& f) {
// Set your GPU device if available to execute kernel on
const tbb::flow::opencl_device_list &devices = f.devices();
tbb::flow::opencl_device_list::const_iterator it = std::find_if(
devices.cbegin(), devices.cend(),
[](const tbb::flow::opencl_device &d) {
cl_device_type type;
d.info(CL_DEVICE_TYPE, type);
return CL_DEVICE_TYPE_GPU == type;
});
if (it == devices.cend()) {
std::cout << "Info: could not find any GPU devices. Choosing the first available device (default behaviour)." << std::endl;
return *(f.devices().begin());
} else {
// Return GPU device from factory
return *it;
}
}
};
// Image processing function that is executed on CPU only
void hostFunction(const std::string& firstFile, const std::string& secondFile, const std::string& outputFile) {
using namespace tbb::flow;
typedef tuple< utils::image_buffer, utils::image_buffer > MergeImagesTuple;
graph g;
function_node< std::string, utils::image_buffer > fileReaderOne(g, serial, [](const std::string& fileToRead) -> utils::image_buffer {
return utils::getOrGenerateImage(fileToRead);
});
function_node< std::string, utils::image_buffer > fileReaderTwo = fileReaderOne;
function_node< utils::image_buffer, utils::image_buffer > leftImageEffect(g, unlimited, [](utils::image_buffer image) -> utils::image_buffer {
applyLeftImageEffect(image);
return image;
});
function_node< utils::image_buffer, utils::image_buffer > rightImageEffect(g, unlimited, [](utils::image_buffer image) -> utils::image_buffer {
applyRightImageEffect(image);
return image;
});
join_node< tuple< utils::image_buffer, utils::image_buffer > > joinNode(g);
function_node< MergeImagesTuple, utils::image_buffer > mergeImages(g, unlimited, [](const MergeImagesTuple& bufferTuple) -> utils::image_buffer {
// Two input images from tuple are merged into the first image,
utils::image_buffer leftImageBuffer = std::get<0>(bufferTuple);
utils::image_buffer rightImageBuffer = std::get<1>(bufferTuple);
mergeImageBuffers(leftImageBuffer, rightImageBuffer);
return leftImageBuffer;
});
function_node< utils::image_buffer > outputWriter(g, unlimited, [&outputFile](const utils::image_buffer& image) {
utils::writePNGImage(image, outputFile);
});
// Read left image
make_edge(fileReaderOne, leftImageEffect);
// Read right image
make_edge(fileReaderTwo, rightImageEffect);
// Process left image
make_edge(leftImageEffect, tbb::flow::input_port<0>(joinNode));
// Process right image
make_edge(rightImageEffect, tbb::flow::input_port<1>(joinNode));
// Merge images
make_edge(joinNode, mergeImages);
make_edge(mergeImages, outputWriter);
// Start graph image processing
fileReaderOne.try_put(firstFile);
fileReaderTwo.try_put(secondFile);
g.wait_for_all();
}
// Image processing function using OpenCL
/** Reading and writing image to file is executed on CPU, while all buffers manipulation are executed on GPU */
void openclFunctionGPU(const std::string& firstFile, const std::string& secondFile, const std::string& outputFile) {
using namespace tbb::flow;
typedef opencl_buffer<cl_uchar> OpenclImageBuffer;
typedef std::array<unsigned int, 2> NDRange;
typedef tuple< OpenclImageBuffer, cl_uint, NDRange > OpenclImageTuple;
typedef tuple< OpenclImageBuffer, OpenclImageBuffer, cl_uint, NDRange > OpenclImagesMergeTuple;
typedef tuple< OpenclImageBuffer, NDRange > WriteImageBufferTuple;
graph g;
gpu_device_selector gpu_selector;
function_node< std::string, OpenclImageTuple > fileReaderOne(g, serial, [&g](const std::string& fileToRead) -> OpenclImageTuple {
utils::image_buffer src = utils::getOrGenerateImage(fileToRead);
// Create and initialize opencl_buffer in order to pass it to kernel
OpenclImageBuffer oclImage(src.buffer->size());
fillOpenclBuffer(oclImage, *src.buffer);
NDRange rangeList = { src.width, src.height };
return std::make_tuple(oclImage, src.width, rangeList);
});
function_node< std::string, OpenclImageTuple > fileReaderTwo = fileReaderOne;
split_node< OpenclImageTuple > splitArgumentsLeftNode(g);
// Kernel should be in the current folder
opencl_program<> program("imageEffects.cl");
opencl_node< OpenclImageTuple > leftImageEffect(g, program.get_kernel("applyLeftImageEffect"), gpu_selector);
split_node< OpenclImageTuple > splitArgumentsRightNode(g);
opencl_node< OpenclImageTuple > rightImageEffect(g, program.get_kernel("applyRightImageEffect"), gpu_selector);
opencl_node< OpenclImagesMergeTuple > mergeImages(g, program.get_kernel("mergeImages"), gpu_selector);
join_node< WriteImageBufferTuple > joinTupleNode(g);
function_node< WriteImageBufferTuple > outputWriter(g, unlimited, [&outputFile](const WriteImageBufferTuple& image) {
// The result image have to be copied in order to be changed,
// the second parameter - image size, can be taken by const reference
OpenclImageBuffer imageBuffer = std::get<0>(image);
const NDRange& imageSize = std::get<1>(image);
unsigned int width = imageSize[0];
unsigned int height = imageSize[1];
utils::writePNGImage(imageBuffer.data(), width, height, outputFile);
});
// Process left image
make_edge(fileReaderOne, splitArgumentsLeftNode);
make_edge(output_port<0>(splitArgumentsLeftNode), input_port<0>(leftImageEffect));
make_edge(output_port<1>(splitArgumentsLeftNode), input_port<1>(leftImageEffect));
// Pass OpenCL NDRange via input port because it depends on input data
make_edge(output_port<2>(splitArgumentsLeftNode), input_port<2>(leftImageEffect));
// Process right image
make_edge(fileReaderTwo, splitArgumentsRightNode);
make_edge(output_port<0>(splitArgumentsRightNode), input_port<0>(rightImageEffect));
make_edge(output_port<1>(splitArgumentsRightNode), input_port<1>(rightImageEffect));
// Pass OpenCL NDRange via input port because it depends on input data
make_edge(output_port<2>(splitArgumentsRightNode), input_port<2>(rightImageEffect));
// Merge images
make_edge(output_port<0>(leftImageEffect), input_port<0>(mergeImages));
make_edge(output_port<0>(rightImageEffect), input_port<1>(mergeImages));
make_edge(output_port<1>(leftImageEffect), input_port<2>(mergeImages));
// Set OpenCL NDRange here (because the values may vary, depending on input data)
make_edge(output_port<2>(leftImageEffect), input_port<3>(mergeImages));
// Write image to PNG
make_edge(output_port<0>(mergeImages), input_port<0>(joinTupleNode));
make_edge(output_port<3>(mergeImages), input_port<1>(joinTupleNode));
make_edge(joinTupleNode, outputWriter);
// Define where to get ndrange and kernel arguments
leftImageEffect.set_args(port_ref<0, 1>());
leftImageEffect.set_range(port_ref<2>());
rightImageEffect.set_args(port_ref<0, 1>());
rightImageEffect.set_range(port_ref<2>());
mergeImages.set_args(port_ref<0, 2>());
mergeImages.set_range(port_ref<3>());
// Start graph image processing pipeline
fileReaderOne.try_put(firstFile);
fileReaderTwo.try_put(secondFile);
g.wait_for_all();
}
// Second image processing function using OpenCL
/** Reading and writing image to file is executed on CPU, while some buffers manipulation are executed on GPU
and others runs on CPU device. This case should have the best performance among others. */
void openclFunctionGPUPlusCPU(const std::string& firstFile, const std::string& secondFile, const std::string& outputFile) {
using namespace tbb::flow;
typedef opencl_buffer<cl_uchar> OpenclImageBuffer;
typedef std::array<unsigned int, 2> NDRange;
typedef tuple< OpenclImageBuffer, cl_uint, NDRange > OpenclImageTuple;
typedef tuple< OpenclImageBuffer, OpenclImageBuffer, cl_uint, NDRange > OpenclImagesMergeTuple;
typedef tuple< OpenclImageBuffer, NDRange > WriteImageBufferTuple;
graph g;
gpu_device_selector gpu_selector;
function_node< std::string, OpenclImageTuple > fileReaderOne(g, serial, [&g](const std::string& fileToRead) -> OpenclImageTuple {
utils::image_buffer src = utils::getOrGenerateImage(fileToRead);
// Create and initialize opencl_buffer in order to pass it to mergeImages kernel
OpenclImageBuffer oclImage(src.buffer->size());
fillOpenclBuffer(oclImage, *src.buffer);
NDRange rangeList = { src.width, src.height };
return std::make_tuple(oclImage, src.width, rangeList);
});
function_node< std::string, utils::image_buffer > fileReaderTwo(g, serial, [](const std::string& fileToRead) -> utils::image_buffer {
return utils::readPNGImage(fileToRead);
});
split_node< OpenclImageTuple > splitArgumentsLeftNode(g);
// Kernel should be in the current folder
opencl_program<> program("imageEffects.cl");
opencl_node< OpenclImageTuple > leftImageEffect(g, program.get_kernel("applyLeftImageEffect"), gpu_selector);
function_node< utils::image_buffer, OpenclImageBuffer > rightImageEffect(g, unlimited, [&g](utils::image_buffer image) -> OpenclImageBuffer {
applyRightImageEffect(image);
// Create and initialize opencl_buffer in order to pass it to kernel
OpenclImageBuffer oclImage(image.buffer->size());
fillOpenclBuffer(oclImage, *image.buffer);
return oclImage;
});
opencl_node< OpenclImagesMergeTuple > mergeImages(g, program.get_kernel("mergeImages"), gpu_selector);
join_node< WriteImageBufferTuple > joinTupleNode(g);
function_node< WriteImageBufferTuple > outputWriter(g, unlimited, [&outputFile](const WriteImageBufferTuple& image) {
// The result image have to be copied in order to be changed,
// the second parameter - image size, can be taken by const reference
OpenclImageBuffer imageBuffer = std::get<0>(image);
const NDRange& imageSize = std::get<1>(image);
unsigned int width = imageSize[0];
unsigned int height = imageSize[1];
utils::writePNGImage(imageBuffer.data(), width, height, outputFile);
});
// Process left image on GPU
make_edge(fileReaderOne, splitArgumentsLeftNode);
make_edge(output_port<0>(splitArgumentsLeftNode), input_port<0>(leftImageEffect));
make_edge(output_port<1>(splitArgumentsLeftNode), input_port<1>(leftImageEffect));
// Pass OpenCL NDRange via input port because it depends on input data
make_edge(output_port<2>(splitArgumentsLeftNode), input_port<2>(leftImageEffect));
// Process right image on CPU
make_edge(fileReaderTwo, rightImageEffect);
// Merge images on GPU
make_edge(output_port<0>(leftImageEffect), input_port<0>(mergeImages));
make_edge(rightImageEffect, input_port<1>(mergeImages));
make_edge(output_port<1>(leftImageEffect), input_port<2>(mergeImages));
// Pass OpenCL NDRange via input port because it depends on input data
make_edge(output_port<2>(leftImageEffect), input_port<3>(mergeImages));
// Write image to PNG
make_edge(output_port<0>(mergeImages), input_port<0>(joinTupleNode));
make_edge(output_port<3>(mergeImages), input_port<1>(joinTupleNode));
make_edge(joinTupleNode, outputWriter);
// Define where to get ndrange and kernel arguments
leftImageEffect.set_args(port_ref<0, 1>());
leftImageEffect.set_range(port_ref<2>());
mergeImages.set_args(port_ref<0, 2>());
mergeImages.set_range(port_ref<3>());
// Start graph image processing pipeline
fileReaderOne.try_put(firstFile);
fileReaderTwo.try_put(secondFile);
g.wait_for_all();
}
int main(int argc, char* argv[]) {
try {
tbb::tick_count mainStartTime = tbb::tick_count::now();
bool verbose = false;
std::string algVersion;
std::string inputFileFirst;
std::string inputFileSecond;
std::string outputFile = "output.png";
utility::parse_cli_arguments(argc, argv,
utility::cli_argument_pack()
//"-h" option for displaying help
.arg(verbose, "-v", "verbose mode")
.arg(algVersion, "-alg", "name of the used pipeline realisation - can be host, target (default) or host_target")
.positional_arg(inputFileFirst, "first_filename", "first input file name")
.positional_arg(inputFileSecond, "second_filename", "second input file name")
);
if (!utils::isBothImagesExists(inputFileFirst, inputFileSecond)) {
std::cout << "Info: one or both images does not exists or empty. Input images will be generated instead." << std::endl;
inputFileFirst.clear();
inputFileSecond.clear();
} else {
std::cout << "First input file name: " << inputFileFirst << std::endl;
std::cout << "Second input file name: " << inputFileSecond << std::endl;
}
if (algVersion.empty() || algVersion == "target") {
openclFunctionGPU(inputFileFirst, inputFileSecond, outputFile);
} else if (algVersion == "host_target") {
openclFunctionGPUPlusCPU(inputFileFirst, inputFileSecond, outputFile);
} else if (algVersion == "host") {
hostFunction(inputFileFirst, inputFileSecond, outputFile);
}
utility::report_elapsed_time((tbb::tick_count::now() - mainStartTime).seconds());
return 0;
} catch (std::exception& e) {
std::cerr << "Error occurred :\"" << e.what() << "\"\n";
return -1;
}
}
#else
int main() {
utility::report_skipped();
return 0;
}
#endif /* __TBB_PREVIEW_OPENCL_NODE && __TBB_CPP11_LAMBDAS_PRESENT */

View File

@@ -0,0 +1,104 @@
/*
Copyright (c) 2005-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include <iostream>
#include <string>
#include "lodepng.h"
namespace utils {
inline unsigned char convert_uchar_sat(unsigned int v) {
return static_cast<unsigned char>(v < UCHAR_MAX ? v : UCHAR_MAX);
}
struct image_buffer {
unsigned int width, height;
std::shared_ptr< std::vector<unsigned char> > buffer; // smart pointer to the vector of raw pixels in RGBA format, 4 bytes per pixel
};
image_buffer readPNGImage(const std::string& imageName) {
image_buffer image;
image.buffer = std::make_shared< std::vector<unsigned char> >();
unsigned int error = lodepng::decode(*image.buffer, image.width, image.height, imageName.c_str());
if (error) {
std::string exceptionMessage = "decoder error: " + std::string(lodepng_error_text(error));
throw std::runtime_error(exceptionMessage);
}
return image;
}
void readPNGImage(unsigned char* imageBuffer, unsigned int& width, unsigned int& height, const char* imageName) {
unsigned int error = lodepng_decode32_file(&imageBuffer, &width, &height, imageName);
if (error) {
std::string exceptionMessage = "decoder error: " + std::string(lodepng_error_text(error));
throw std::runtime_error(exceptionMessage);
}
}
void writePNGImage(const image_buffer& image, const std::string& outputFile) {
unsigned int error = lodepng::encode(outputFile, *image.buffer, image.width, image.height);
if (error) {
std::string exceptionMessage = "encoder error: " + std::string(lodepng_error_text(error));
throw std::runtime_error(exceptionMessage);
}
}
void writePNGImage(unsigned char* imageBuffer, unsigned int& width, unsigned int& height, const std::string& outputFile) {
unsigned int error = lodepng::encode(outputFile, imageBuffer, width, height);
if (error) {
std::string exceptionMessage = "encoder error: " + std::string(lodepng_error_text(error));
throw std::runtime_error(exceptionMessage);
}
}
image_buffer generatePNGImage() {
image_buffer image;
image.width = 1024;
image.height = 1024;
image.buffer = std::make_shared< std::vector<unsigned char> >(image.width * image.height * 4);
std::vector<unsigned char>& buffer = *image.buffer;
const int widthOffset = 4 * image.width;
for (unsigned y = 0; y < image.height; y++) {
for (unsigned x = 0; x < image.width; x++) {
const int pixelOffset = widthOffset * y + 4 * x;
buffer[pixelOffset] = 200 * !(x & y);
buffer[pixelOffset + 1] = x ^ y;
buffer[pixelOffset + 2] = x | y;
buffer[pixelOffset + 3] = 255;
}
}
return image;
}
bool isFileExist(const std::string& fileName) {
std::ifstream file(fileName);
return file.good();
}
bool isBothImagesExists(const std::string& firstFile, const std::string& secondFile) {
return isFileExist(firstFile) && isFileExist(secondFile);
}
image_buffer getOrGenerateImage(const std::string& fileName) {
return fileName.empty() ? generatePNGImage() : readPNGImage(fileName);
}
}

View File

@@ -0,0 +1,324 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
8415B6821CFC8B7F00A875B5 /* stereo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8415B6801CFC8B7F00A875B5 /* stereo.cpp */; };
8415B6881CFC8B9200A875B5 /* lodepng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8415B6851CFC8B9200A875B5 /* lodepng.cpp */; };
8415B68A1CFC96D900A875B5 /* OpenCL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8415B6891CFC96D900A875B5 /* OpenCL.framework */; };
/* End PBXBuildFile section */
/* Begin PBXBuildRule section */
C3C58958218B657900DAC94C /* PBXBuildRule */ = {
isa = PBXBuildRule;
compilerSpec = com.intel.compilers.icc.latest;
fileType = sourcecode.cpp;
isEditable = 1;
outputFiles = (
);
script = "# Type a script or drag a script file from your workspace to insert its path.\n";
};
/* End PBXBuildRule section */
/* Begin PBXCopyFilesBuildPhase section */
8DD76F690486A84900D96B5E /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 12;
dstPath = "";
dstSubfolderSpec = 16;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
8415B6801CFC8B7F00A875B5 /* stereo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = stereo.cpp; path = ../stereo.cpp; sourceTree = "<group>"; };
8415B6831CFC8B9200A875B5 /* imageEffects.cl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.opencl; name = imageEffects.cl; path = ../imageEffects.cl; sourceTree = "<group>"; };
8415B6851CFC8B9200A875B5 /* lodepng.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lodepng.cpp; path = ../lodepng.cpp; sourceTree = "<group>"; };
8415B6861CFC8B9200A875B5 /* lodepng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lodepng.h; path = ../lodepng.h; sourceTree = "<group>"; };
8415B6891CFC96D900A875B5 /* OpenCL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenCL.framework; path = System/Library/Frameworks/OpenCL.framework; sourceTree = SDKROOT; };
8DD76F6C0486A84900D96B5E /* Stereo */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Stereo; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8DD76F660486A84900D96B5E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8415B68A1CFC96D900A875B5 /* OpenCL.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
08FB7794FE84155DC02AAC07 /* Stereo */ = {
isa = PBXGroup;
children = (
8415B6891CFC96D900A875B5 /* OpenCL.framework */,
08FB7795FE84155DC02AAC07 /* Source */,
1AB674ADFE9D54B511CA2CBB /* Products */,
);
name = Stereo;
sourceTree = "<group>";
};
08FB7795FE84155DC02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
8415B6831CFC8B9200A875B5 /* imageEffects.cl */,
8415B6851CFC8B9200A875B5 /* lodepng.cpp */,
8415B6861CFC8B9200A875B5 /* lodepng.h */,
8415B6801CFC8B7F00A875B5 /* stereo.cpp */,
);
name = Source;
sourceTree = "<group>";
};
1AB674ADFE9D54B511CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8DD76F6C0486A84900D96B5E /* Stereo */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8DD76F620486A84900D96B5E /* Stereo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Stereo" */;
buildPhases = (
8DD76F640486A84900D96B5E /* Sources */,
8DD76F660486A84900D96B5E /* Frameworks */,
8DD76F690486A84900D96B5E /* CopyFiles */,
);
buildRules = (
C3C58958218B657900DAC94C /* PBXBuildRule */,
);
dependencies = (
);
name = Stereo;
productInstallPath = "$(HOME)/bin";
productName = Stereo;
productReference = 8DD76F6C0486A84900D96B5E /* Stereo */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1000;
};
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "stereo" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
en,
);
mainGroup = 08FB7794FE84155DC02AAC07 /* Stereo */;
projectDirPath = "";
projectRoot = "";
targets = (
8DD76F620486A84900D96B5E /* Stereo */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
8DD76F640486A84900D96B5E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8415B6881CFC8B9200A875B5 /* lodepng.cpp in Sources */,
8415B6821CFC8B7F00A875B5 /* stereo.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
A1F593C60B8F0E6E00073279 /* Debug64 */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = "";
HEADER_SEARCH_PATHS = "$(inherited)";
ICC_CXX_LANG_DIALECT = "c++11";
INSTALL_PATH = "$(HOME)/bin";
LD_RUNPATH_SEARCH_PATHS = "$(inherited)";
LIBRARY_SEARCH_PATHS = "$(inherited)";
PRODUCT_NAME = Stereo;
ZERO_LINK = NO;
};
name = Debug64;
};
A1F593C70B8F0E6E00073279 /* Release64 */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_VERSION = "";
HEADER_SEARCH_PATHS = "$(inherited)";
ICC_CXX_LANG_DIALECT = "c++11";
INSTALL_PATH = "$(HOME)/bin";
LD_RUNPATH_SEARCH_PATHS = "$(inherited)";
LIBRARY_SEARCH_PATHS = "$(inherited)";
PRODUCT_NAME = Stereo;
ZERO_LINK = NO;
};
name = Release64;
};
A1F593C80B8F0E6E00073279 /* Debug64 */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_ENABLE_CPP_RTTI = YES;
GCC_MODEL_TUNING = "";
GCC_NO_COMMON_BLOCKS = YES;
GCC_VERSION = "";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"$(TBBROOT)/include",
/opt/intel/tbb/include,
);
ICC_CXX_LANG_DIALECT = "c++11";
LD_RUNPATH_SEARCH_PATHS = "$(TBBROOT)/lib /opt/intel/tbb/lib";
LIBRARY_SEARCH_PATHS = (
"$(TBBROOT)/lib",
/opt/intel/tbb/lib,
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
ONLY_ACTIVE_ARCH = YES;
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-m64",
);
OTHER_LDFLAGS = (
"-m64",
"-ltbb_debug",
"-framework",
OpenCL,
);
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
SYMROOT = "/tmp/tbb-$(USER)";
VALID_ARCHS = x86_64;
};
name = Debug64;
};
A1F593C90B8F0E6E00073279 /* Release64 */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_ENABLE_CPP_RTTI = YES;
GCC_MODEL_TUNING = "";
GCC_NO_COMMON_BLOCKS = YES;
GCC_VERSION = "";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"$(TBBROOT)/include",
/opt/intel/tbb/include,
);
ICC_CXX_LANG_DIALECT = "c++11";
LD_RUNPATH_SEARCH_PATHS = "$(TBBROOT)/lib /opt/intel/tbb/lib";
LIBRARY_SEARCH_PATHS = (
"$(TBBROOT)/lib",
/opt/intel/tbb/lib,
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
OTHER_CPLUSPLUSFLAGS = (
"$(OTHER_CFLAGS)",
"-m64",
);
OTHER_LDFLAGS = (
"-m64",
"-ltbb",
"-framework",
OpenCL,
);
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
SYMROOT = "/tmp/tbb-$(USER)";
VALID_ARCHS = x86_64;
};
name = Release64;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Stereo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A1F593C60B8F0E6E00073279 /* Debug64 */,
A1F593C70B8F0E6E00073279 /* Release64 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release64;
};
1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "stereo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A1F593C80B8F0E6E00073279 /* Debug64 */,
A1F593C90B8F0E6E00073279 /* Release64 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release64;
};
/* End XCConfigurationList section */
};
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
}