More Linux work. This has Render, Animate and Genome building and running on Linux.

This commit is contained in:
mfeemster 2014-12-05 18:30:46 -08:00
parent 4777ab52bc
commit a15f6d6b32
44 changed files with 2614 additions and 1021 deletions

View File

@ -8,18 +8,19 @@
<Option virtualFolders="Headers/Filters/;/Headers/Xml/;" />
<Build>
<Target title="Debug x64">
<Option platforms="Unix;" />
<Option output="Ember" prefix_auto="1" extension_auto="1" />
<Option type="3" />
<Option compiler="gcc" />
<Option createDefFile="1" />
<Option createStaticLib="1" />
<Compiler>
<Add option="-g" />
<Add option="-D_M_X64" />
<Add option="-D_USRDLL" />
<Add option="-D_DEBUG" />
<Add option="-D_CONSOLE" />
<Add option="-DBUILDING_EMBER" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
<Target title="ReleaseNvidia Win32">
<Option output="Ember" prefix_auto="1" extension_auto="1" />
@ -50,9 +51,12 @@
<Option createDefFile="1" />
<Option createStaticLib="1" />
<Compiler>
<Add option="-fomit-frame-pointer" />
<Add option="-O2" />
<Add option="-D_M_X64" />
<Add option="-D_USRDLL" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add option="-DBUILDING_EMBER" />
</Compiler>
<Linker>
<Add option="-s" />
@ -75,6 +79,7 @@
</Build>
<Compiler>
<Add option="-march=k8" />
<Add option="-fomit-frame-pointer" />
<Add option="-Wnon-virtual-dtor" />
<Add option="-Wshadow" />
<Add option="-Winit-self" />
@ -89,12 +94,10 @@
<Add option="-pedantic" />
<Add option="-Wzero-as-null-pointer-constant" />
<Add option="-std=c++11" />
<Add option="-Wfatal-errors" />
<Add option="-Wall" />
<Add option="-fpermissive" />
<Add option="-fPIC" />
<Add option="-D_M_X64" />
<Add option="-D_USRDLL" />
<Add option="-DBUILDING_EMBER" />
<Add directory="/usr/include/libxml2" />
</Compiler>
<Linker>

View File

@ -1,9 +1,9 @@
# depslib dependency file v1.0
1413384022 source:/home/heretic/Dev/fractorium/Source/Ember/Affine2D.cpp
1417821052 source:/home/heretic/Dev/fractorium/Source/Ember/Affine2D.cpp
"EmberPch.h"
"Affine2D.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
<SDKDDKVer.h>
<windows.h>
<libgen.h>
@ -160,22 +160,22 @@
<libxml/parser.h>
<libxml/encoding.h>
1413384022 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
1417810095 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
"Utils.h"
1413385950 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
1417776440 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
"Isaac.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
"EmberDefines.h"
1413385406 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
1417811373 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
"EmberPch.h"
1413384022 source:/home/heretic/Dev/fractorium/Source/Ember/DllMain.cpp
1417760119 source:/home/heretic/Dev/fractorium/Source/Ember/DllMain.cpp
"EmberPch.h"
1413384022 source:/home/heretic/Dev/fractorium/Source/Ember/Ember.cpp
1417813888 source:/home/heretic/Dev/fractorium/Source/Ember/Ember.cpp
"EmberPch.h"
"EmberDefines.h"
"Isaac.h"
@ -205,17 +205,17 @@
"Timing.h"
"SheepTools.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
"Xform.h"
"PaletteList.h"
"SpatialFilter.h"
"TemporalFilter.h"
1413384023 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
"VariationList.h"
"Interpolate.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
"Variations01.h"
"Variations02.h"
"Variations03.h"
@ -223,70 +223,70 @@
"Variations05.h"
"VariationsDC.h"
1413384023 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
"Variation.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
"Point.h"
"Isaac.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/Point.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Point.h
"EmberDefines.h"
"Affine2D.h"
"Timing.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
"EmberDefines.h"
1413384023 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
"Variation.h"
1413384023 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
"Variation.h"
1413384023 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
"Variation.h"
1413384023 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
"Variation.h"
1413384023 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
"Variation.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
"Ember.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
"Palette.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
"Utils.h"
"Isaac.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
"EmberDefines.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
"EmberDefines.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
"Ember.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
"Ember.h"
1413385813 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
"SpatialFilter.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
1417810944 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
"RendererBase.h"
"Iterator.h"
"SpatialFilter.h"
@ -295,20 +295,28 @@
"CarToRas.h"
"EmberToXml.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
1417770762 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
"Utils.h"
"Ember.h"
"DensityFilter.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
"Point.h"
1413384022 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
"EmberDefines.h"
"Isaac.h"
"VariationList.h"
"Renderer.h"
1413384022 source:/home/heretic/Dev/fractorium/Source/Ember/EmberPch.cpp
1417760119 source:/home/heretic/Dev/fractorium/Source/Ember/EmberPch.cpp
"EmberPch.h"
1417813874 source:/home/heretic/Dev/fractorium/Source/Ember/Renderer.cpp
"EmberPch.h"
"Renderer.h"
1417760119 source:/home/heretic/Dev/fractorium/Source/Ember/RendererBase.cpp
"EmberPch.h"
"RendererBase.h"

View File

@ -1,14 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Release x64" />
<File name="../../Source/Ember/Ember.cpp" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/Ember.cpp" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/Ember/VariationsDC.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6270" topLine="202" />
<Cursor1 position="13691" topLine="374" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations05.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -16,24 +11,9 @@
<Cursor1 position="37378" topLine="1097" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberToXml.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/SheepTools.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="20943" topLine="583" />
</Cursor>
</File>
<File name="../../Source/Ember/TemporalFilter.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9058" topLine="269" />
</Cursor>
</File>
<File name="../../Source/Ember/Affine2D.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1969" topLine="12" />
</Cursor>
</File>
<File name="../../Source/Ember/VariationList.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14159" topLine="419" />
<Cursor1 position="26633" topLine="913" />
</Cursor>
</File>
<File name="../../Source/Ember/Timing.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -41,69 +21,49 @@
<Cursor1 position="1699" topLine="12" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberDefines.h" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/Variations01.h" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2838" topLine="47" />
<Cursor1 position="3674" topLine="128" />
</Cursor>
</File>
<File name="../../Source/Ember/DllMain.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/Iterator.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
<Cursor1 position="2509" topLine="39" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations04.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/EmberPch.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="98407" topLine="3204" />
<Cursor1 position="314" topLine="0" />
</Cursor>
</File>
<File name="../../Source/Ember/XmlToEmber.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/SpatialFilter.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="16510" topLine="323" />
<Cursor1 position="22861" topLine="816" />
</Cursor>
</File>
<File name="../../Source/Ember/Interpolate.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/Variations03.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="18225" topLine="507" />
</Cursor>
</File>
<File name="../../Source/Ember/Palette.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8808" topLine="105" />
</Cursor>
</File>
<File name="../../Source/Ember/SheepTools.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="26633" topLine="913" />
</Cursor>
</File>
<File name="../../Source/Ember/Affine2D.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/Ember/Utils.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="22496" topLine="746" />
</Cursor>
</File>
<File name="../../Source/Ember/Isaac.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8062" topLine="258" />
<Cursor1 position="62259" topLine="1950" />
</Cursor>
</File>
<File name="../../Source/Ember/Ember.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="19820" topLine="664" />
<Cursor1 position="35507" topLine="1125" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations01.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/TemporalFilter.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="136093" topLine="4660" />
<Cursor1 position="9058" topLine="269" />
</Cursor>
</File>
<File name="../../Source/Ember/Renderer.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/EmberToXml.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="16331" topLine="326" />
<Cursor1 position="20943" topLine="583" />
</Cursor>
</File>
<File name="../../Source/Ember/Renderer.h" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9387" topLine="165" />
</Cursor>
</File>
<File name="../../Source/Ember/Point.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -113,27 +73,7 @@
</File>
<File name="../../Source/Ember/Xform.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="32608" topLine="1024" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberPch.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/Ember/SpatialFilter.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="22861" topLine="816" />
</Cursor>
</File>
<File name="../../Source/Ember/CarToRas.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2973" topLine="67" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberPch.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="953" topLine="25" />
<Cursor1 position="38604" topLine="1219" />
</Cursor>
</File>
<File name="../../Source/Ember/PaletteList.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -141,24 +81,74 @@
<Cursor1 position="1381" topLine="37" />
</Cursor>
</File>
<File name="../../Source/Ember/XmlToEmber.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="28302" topLine="621" />
</Cursor>
</File>
<File name="../../Source/Ember/Interpolate.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="18225" topLine="507" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations04.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="98407" topLine="3204" />
</Cursor>
</File>
<File name="../../Source/Ember/Palette.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8808" topLine="105" />
</Cursor>
</File>
<File name="../../Source/Ember/Affine2D.cpp" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10791" topLine="336" />
</Cursor>
</File>
<File name="../../Source/Ember/Variation.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="42788" topLine="1649" />
<Cursor1 position="46958" topLine="1599" />
</Cursor>
</File>
<File name="../../Source/Ember/Iterator.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/CarToRas.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2509" topLine="39" />
<Cursor1 position="2973" topLine="67" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations03.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/RendererBase.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="62259" topLine="1950" />
<Cursor1 position="6837" topLine="184" />
</Cursor>
</File>
<File name="../../Source/Ember/Renderer.cpp" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/Ember/VariationList.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="13576" topLine="347" />
<Cursor1 position="14159" topLine="419" />
</Cursor>
</File>
<File name="../../Source/Ember/Utils.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="24688" topLine="817" />
</Cursor>
</File>
<File name="../../Source/Ember/Renderer.cpp" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="64477" topLine="1566" />
</Cursor>
</File>
<File name="../../Source/Ember/DllMain.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/Ember/VariationsDC.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="22857" topLine="672" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberPch.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/Ember/Variations02.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -166,4 +156,19 @@
<Cursor1 position="116327" topLine="3912" />
</Cursor>
</File>
<File name="../../Source/Ember/EmberDefines.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2273" topLine="59" />
</Cursor>
</File>
<File name="../../Source/Ember/Affine2D.h" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2877" topLine="92" />
</Cursor>
</File>
<File name="../../Source/Ember/Isaac.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8062" topLine="258" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -8,162 +8,95 @@
<Build>
<Target title="Debug x64">
<Option output="EmberAnimate" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-g" />
<Add option="-D_M_X64" />
<Add option="-D_DEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86_64" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
</Target>
<Target title="ReleaseNvidia Win32">
<Option output="EmberAnimate" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
<Option use_console_runner="0" />
</Target>
<Target title="ReleaseNvidia x64">
<Option output="EmberAnimate" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
<Option use_console_runner="0" />
</Target>
<Target title="Release x64">
<Option output="EmberAnimate" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-O2" />
<Add option="-D_M_X64" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86_64" />
<Add directory="$(CUDA_PATH)lib/Linux" />
<Add option="-s" />
</Linker>
</Target>
<Target title="Release Win32">
<Option output="EmberAnimate" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
<Option use_console_runner="0" />
</Target>
<Target title="Debug Win32">
<Option output="EmberAnimate" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-D_DEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
<Option use_console_runner="0" />
</Target>
</Build>
<Compiler>
<Add option="-march=k8" />
<Add option="-fomit-frame-pointer" />
<Add option="-Wnon-virtual-dtor" />
<Add option="-Wshadow" />
<Add option="-Winit-self" />
<Add option="-Wredundant-decls" />
<Add option="-Wcast-align" />
<Add option="-Wunreachable-code" />
<Add option="-Wswitch-enum" />
<Add option="-Wswitch-default" />
<Add option="-Wmain" />
<Add option="-Wzero-as-null-pointer-constant" />
<Add option="-std=c++11" />
<Add option="-Wfatal-errors" />
<Add option="-Wall" />
<Add option="-fpermissive" />
<Add option="-fPIC" />
<Add directory="/usr/include/libxml2" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../Source/EmberCommon" />
</Compiler>
<Linker>
<Add library="tbb" />
<Add library="libxml2" />
<Add library="jpeg" />
<Add library="libpng" />
<Add library="Ember" />
<Add library="EmberCL" />
<Add library="OpenCL" />
<Add directory="./" />
</Linker>
<ExtraCommands>
<Add after="cp --update ../../Data/flam3-palettes.xml ./flam3-palettes.xml" />
<Mode after="always" />
</ExtraCommands>
<Unit filename="../../Source/EmberAnimate/EmberAnimate.cpp" />
<Unit filename="../../Source/EmberAnimate/EmberAnimate.h" />
<Unit filename="../../Source/EmberAnimate/EmberAnimate.rc" />
<Unit filename="../../Source/EmberAnimate/resource.h" />
<Unit filename="../../Source/EmberCommon/EmberCommon.h" />
<Unit filename="../../Source/EmberCommon/EmberCommonPch.cpp" />
@ -173,7 +106,6 @@
<Unit filename="../../Source/EmberCommon/SimpleGlob.h" />
<Unit filename="../../Source/EmberCommon/SimpleOpt.h" />
<Unit filename="../../Source/Fractorium/Icons/Fractorium.ico" />
<Unit filename="ReadMe.txt" />
<Extensions>
<code_completion />
<debugger />

View File

@ -0,0 +1,392 @@
# depslib dependency file v1.0
1417760119 source:/home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.cpp
"EmberCommonPch.h"
1417812217 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.h
<SDKDDKVer.h>
<windows.h>
<winsock.h>
<BaseTsd.h>
<crtdbg.h>
<tchar.h>
<arpa/inet.h>
<iostream>
<iomanip>
<ostream>
<sstream>
<setjmp.h>
<stdio.h>
<stdlib.h>
<string.h>
"jconfig.h"
"jpeglib.h"
"png.h"
"Ember.h"
"Variation.h"
"EmberToXml.h"
"XmlToEmber.h"
"PaletteList.h"
"Iterator.h"
"Renderer.h"
"RendererCL.h"
"SheepTools.h"
"SimpleGlob.h"
"SimpleOpt.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
"Xform.h"
"PaletteList.h"
"SpatialFilter.h"
"TemporalFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
"VariationList.h"
"Interpolate.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
"Variations01.h"
"Variations02.h"
"Variations03.h"
"Variations04.h"
"Variations05.h"
"VariationsDC.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
"Point.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Point.h
"EmberDefines.h"
"Affine2D.h"
"Timing.h"
1417811373 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
"EmberPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
<SDKDDKVer.h>
<windows.h>
<libgen.h>
<unistd.h>
<algorithm>
<chrono>
<complex>
<cstdint>
<fstream>
<functional>
<inttypes.h>
<iostream>
<iomanip>
<limits>
<malloc.h>
<math.h>
<memory>
<numeric>
<ostream>
<sstream>
<sys/types.h>
<sys/stat.h>
<thread>
<time.h>
<vector>
"libxml/parser.h"
"libxml2/libxml/parser.h"
"tbb/task_group.h"
"tbb/parallel_for.h"
"tbb/task_scheduler_init.h"
"glm/glm.hpp"
"glm/gtc/matrix_transform.hpp"
"glm/gtc/type_ptr.hpp"
"glm/gtx/string_cast.hpp"
1402664682 /usr/include/libxml2/libxml/parser.h
<stdarg.h>
<libxml/xmlversion.h>
<libxml/tree.h>
<libxml/dict.h>
<libxml/hash.h>
<libxml/valid.h>
<libxml/entities.h>
<libxml/xmlerror.h>
<libxml/xmlstring.h>
<libxml/encoding.h>
<libxml/xmlIO.h>
<libxml/globals.h>
1402664682 /usr/include/libxml2/libxml/xmlversion.h
<libxml/xmlexports.h>
<ansidecl.h>
1402664682 /usr/include/libxml2/libxml/xmlexports.h
1402664682 /usr/include/libxml2/libxml/tree.h
<stdio.h>
<limits.h>
<libxml/xmlversion.h>
<libxml/xmlstring.h>
<libxml/xmlregexp.h>
<libxml/xmlmemory.h>
1402664682 /usr/include/libxml2/libxml/xmlstring.h
<stdarg.h>
<libxml/xmlversion.h>
1402664682 /usr/include/libxml2/libxml/xmlregexp.h
<libxml/xmlversion.h>
<libxml/tree.h>
<libxml/dict.h>
1402664682 /usr/include/libxml2/libxml/dict.h
<limits.h>
<libxml/xmlversion.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/xmlmemory.h
<stdio.h>
<libxml/xmlversion.h>
<libxml/threads.h>
<libxml/globals.h>
1402664682 /usr/include/libxml2/libxml/threads.h
<libxml/xmlversion.h>
<libxml/globals.h>
1402664682 /usr/include/libxml2/libxml/globals.h
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/xmlerror.h>
<libxml/SAX.h>
<libxml/SAX2.h>
<libxml/xmlmemory.h>
<libxml/threads.h>
1402664682 /usr/include/libxml2/libxml/xmlerror.h
<libxml/parser.h>
1402664682 /usr/include/libxml2/libxml/SAX.h
<stdio.h>
<stdlib.h>
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/xlink.h>
1402664682 /usr/include/libxml2/libxml/xlink.h
<libxml/xmlversion.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/SAX2.h
<stdio.h>
<stdlib.h>
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/xlink.h>
1402664682 /usr/include/libxml2/libxml/hash.h
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/dict.h>
1402664682 /usr/include/libxml2/libxml/valid.h
<libxml/xmlversion.h>
<libxml/xmlerror.h>
<libxml/tree.h>
<libxml/list.h>
<libxml/xmlautomata.h>
<libxml/xmlregexp.h>
1402664682 /usr/include/libxml2/libxml/list.h
<libxml/xmlversion.h>
1402664682 /usr/include/libxml2/libxml/xmlautomata.h
<libxml/xmlversion.h>
<libxml/tree.h>
<libxml/xmlregexp.h>
1402664682 /usr/include/libxml2/libxml/entities.h
<libxml/xmlversion.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/encoding.h
<libxml/xmlversion.h>
<iconv.h>
<unicode/ucnv.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/xmlIO.h
<stdio.h>
<libxml/xmlversion.h>
<libxml/globals.h>
<libxml/tree.h>
<libxml/parser.h>
<libxml/encoding.h>
1417810095 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
"Utils.h"
1417776440 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
"Palette.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
"Utils.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
"Ember.h"
1417810944 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
"RendererBase.h"
"Iterator.h"
"SpatialFilter.h"
"TemporalFilter.h"
"Interpolate.h"
"CarToRas.h"
"EmberToXml.h"
1417770762 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
"Utils.h"
"Ember.h"
"DensityFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
"SpatialFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
"Point.h"
1417828769 /home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.h
"EmberCLPch.h"
"OpenCLWrapper.h"
"IterOpenCLKernelCreator.h"
"DEOpenCLKernelCreator.h"
"FinalAccumOpenCLKernelCreator.h"
1417766202 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLPch.h
"Timing.h"
"Renderer.h"
<windows.h>
<SDKDDKVer.h>
"GL/glx.h"
<utility>
<CL/cl.hpp>
<algorithm>
<cstdio>
<cstdlib>
<fstream>
<iostream>
<string>
<iterator>
<time.h>
1417770248 /home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.h
"EmberCLPch.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417764380 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLStructs.h
"EmberCLPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLFunctions.h
"EmberCLPch.h"
"EmberCLStructs.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
"EmberDefines.h"
"Isaac.h"
"VariationList.h"
"Renderer.h"
1417816836 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleGlob.h
<mbstring.h>
<sys/types.h>
<sys/stat.h>
<glob.h>
<limits.h>
<stdlib.h>
<string.h>
<wchar.h>
<crtdbg.h>
<assert.h>
1417817700 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleOpt.h
<stdlib.h>
<string.h>
<crtdbg.h>
<assert.h>
1417821813 source:/home/heretic/Dev/fractorium/Source/EmberAnimate/EmberAnimate.cpp
"EmberCommonPch.h"
"EmberAnimate.h"
"JpegUtils.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberAnimate/EmberAnimate.h
"EmberOptions.h"
1417774919 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberOptions.h
"EmberCommon.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommon.h
"EmberCommonPch.h"
1417775759 /home/heretic/Dev/fractorium/Source/EmberCommon/JpegUtils.h
"EmberCommonPch.h"

View File

@ -1,11 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Release x64" />
<File name="../../Source/EmberCommon/EmberCommon.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberAnimate/EmberAnimate.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9928" topLine="290" />

View File

@ -13,12 +13,12 @@
<Option createDefFile="1" />
<Option createStaticLib="1" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-D_DEBUG" />
<Add option="-D_WINDOWS" />
<Add option="-g" />
<Add option="-D_M_X64" />
<Add option="-D_USRDLL" />
<Add option="-D_DEBUG" />
<Add option="-D_CONSOLE" />
<Add option="-DBUILDING_EMBERCL" />
<Add option="-DAMD_OS_WIN" />
<Add directory="../../Source/Ember/" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
@ -27,8 +27,6 @@
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Opengl32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86_64" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
@ -40,12 +38,6 @@
<Option createDefFile="1" />
<Option createStaticLib="1" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_WINDOWS" />
<Add option="-D_USRDLL" />
<Add option="-DBUILDING_EMBERCL" />
<Add option="-DAMD_OS_WIN" />
<Add directory="../../Source/Ember/" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
@ -54,8 +46,6 @@
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Opengl32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
@ -67,12 +57,6 @@
<Option createDefFile="1" />
<Option createStaticLib="1" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_WINDOWS" />
<Add option="-D_USRDLL" />
<Add option="-DBUILDING_EMBERCL" />
<Add option="-DAMD_OS_WIN" />
<Add directory="../../Source/Ember/" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
@ -80,8 +64,6 @@
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Opengl32.lib" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
</Target>
@ -92,12 +74,12 @@
<Option createDefFile="1" />
<Option createStaticLib="1" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_WINDOWS" />
<Add option="-O2" />
<Add option="-D_M_X64" />
<Add option="-D_USRDLL" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add option="-DBUILDING_EMBERCL" />
<Add option="-DAMD_OS_WIN" />
<Add directory="../../Source/Ember/" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
@ -106,8 +88,7 @@
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Opengl32.lib" />
<Add option="-s" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86_64" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
@ -119,12 +100,6 @@
<Option createDefFile="1" />
<Option createStaticLib="1" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_WINDOWS" />
<Add option="-D_USRDLL" />
<Add option="-DBUILDING_EMBERCL" />
<Add option="-DAMD_OS_WIN" />
<Add directory="../../Source/Ember/" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
@ -133,8 +108,6 @@
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Opengl32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
@ -146,12 +119,6 @@
<Option createDefFile="1" />
<Option createStaticLib="1" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-D_DEBUG" />
<Add option="-D_WINDOWS" />
<Add option="-D_USRDLL" />
<Add option="-DBUILDING_EMBERCL" />
<Add option="-DAMD_OS_WIN" />
<Add directory="../../Source/Ember/" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
@ -160,13 +127,34 @@
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Opengl32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-march=k8" />
<Add option="-fomit-frame-pointer" />
<Add option="-Wnon-virtual-dtor" />
<Add option="-Wshadow" />
<Add option="-Winit-self" />
<Add option="-Wredundant-decls" />
<Add option="-Wcast-align" />
<Add option="-Wunreachable-code" />
<Add option="-Wswitch-enum" />
<Add option="-Wswitch-default" />
<Add option="-Wmain" />
<Add option="-Wzero-as-null-pointer-constant" />
<Add option="-std=c++11" />
<Add option="-Wall" />
<Add option="-fpermissive" />
<Add option="-fPIC" />
<Add directory="/usr/include/libxml2" />
</Compiler>
<Linker>
<Add library="GL" />
<Add library="OpenCL" />
</Linker>
<Unit filename="../../Source/EmberCL/DEOpenCLKernelCreator.cpp" />
<Unit filename="../../Source/EmberCL/DEOpenCLKernelCreator.h" />
<Unit filename="../../Source/EmberCL/DllMain.cpp" />

335
Builds/CB/EmberCL.depend Normal file
View File

@ -0,0 +1,335 @@
# depslib dependency file v1.0
1417814313 source:/home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.cpp
"EmberCLPch.h"
"DEOpenCLKernelCreator.h"
1417766202 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLPch.h
"Timing.h"
"Renderer.h"
<windows.h>
<SDKDDKVer.h>
"GL/glx.h"
<utility>
<CL/cl.hpp>
<algorithm>
<cstdio>
<cstdlib>
<fstream>
<iostream>
<string>
<iterator>
<time.h>
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Timing.h
"EmberDefines.h"
1417811373 /home/heretic/Dev/fractorium/Source/Ember//EmberDefines.h
"EmberPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//EmberPch.h
<SDKDDKVer.h>
<windows.h>
<libgen.h>
<unistd.h>
<algorithm>
<chrono>
<complex>
<cstdint>
<fstream>
<functional>
<inttypes.h>
<iostream>
<iomanip>
<limits>
<malloc.h>
<math.h>
<memory>
<numeric>
<ostream>
<sstream>
<sys/types.h>
<sys/stat.h>
<thread>
<time.h>
<vector>
"libxml/parser.h"
"libxml2/libxml/parser.h"
"tbb/task_group.h"
"tbb/parallel_for.h"
"tbb/task_scheduler_init.h"
"glm/glm.hpp"
"glm/gtc/matrix_transform.hpp"
"glm/gtc/type_ptr.hpp"
"glm/gtx/string_cast.hpp"
1402664682 /usr/include/libxml2/libxml/parser.h
<stdarg.h>
<libxml/xmlversion.h>
<libxml/tree.h>
<libxml/dict.h>
<libxml/hash.h>
<libxml/valid.h>
<libxml/entities.h>
<libxml/xmlerror.h>
<libxml/xmlstring.h>
<libxml/encoding.h>
<libxml/xmlIO.h>
<libxml/globals.h>
1402664682 /usr/include/libxml2/libxml/xmlversion.h
<libxml/xmlexports.h>
<ansidecl.h>
1402664682 /usr/include/libxml2/libxml/xmlexports.h
1402664682 /usr/include/libxml2/libxml/tree.h
<stdio.h>
<limits.h>
<libxml/xmlversion.h>
<libxml/xmlstring.h>
<libxml/xmlregexp.h>
<libxml/xmlmemory.h>
1402664682 /usr/include/libxml2/libxml/xmlstring.h
<stdarg.h>
<libxml/xmlversion.h>
1402664682 /usr/include/libxml2/libxml/xmlregexp.h
<libxml/xmlversion.h>
<libxml/tree.h>
<libxml/dict.h>
1402664682 /usr/include/libxml2/libxml/dict.h
<limits.h>
<libxml/xmlversion.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/xmlmemory.h
<stdio.h>
<libxml/xmlversion.h>
<libxml/threads.h>
<libxml/globals.h>
1402664682 /usr/include/libxml2/libxml/threads.h
<libxml/xmlversion.h>
<libxml/globals.h>
1402664682 /usr/include/libxml2/libxml/globals.h
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/xmlerror.h>
<libxml/SAX.h>
<libxml/SAX2.h>
<libxml/xmlmemory.h>
<libxml/threads.h>
1402664682 /usr/include/libxml2/libxml/xmlerror.h
<libxml/parser.h>
1402664682 /usr/include/libxml2/libxml/SAX.h
<stdio.h>
<stdlib.h>
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/xlink.h>
1402664682 /usr/include/libxml2/libxml/xlink.h
<libxml/xmlversion.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/SAX2.h
<stdio.h>
<stdlib.h>
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/xlink.h>
1402664682 /usr/include/libxml2/libxml/hash.h
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/dict.h>
1402664682 /usr/include/libxml2/libxml/valid.h
<libxml/xmlversion.h>
<libxml/xmlerror.h>
<libxml/tree.h>
<libxml/list.h>
<libxml/xmlautomata.h>
<libxml/xmlregexp.h>
1402664682 /usr/include/libxml2/libxml/list.h
<libxml/xmlversion.h>
1402664682 /usr/include/libxml2/libxml/xmlautomata.h
<libxml/xmlversion.h>
<libxml/tree.h>
<libxml/xmlregexp.h>
1402664682 /usr/include/libxml2/libxml/entities.h
<libxml/xmlversion.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/encoding.h
<libxml/xmlversion.h>
<iconv.h>
<unicode/ucnv.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/xmlIO.h
<stdio.h>
<libxml/xmlversion.h>
<libxml/globals.h>
<libxml/tree.h>
<libxml/parser.h>
<libxml/encoding.h>
1417810944 /home/heretic/Dev/fractorium/Source/Ember//Renderer.h
"RendererBase.h"
"Iterator.h"
"SpatialFilter.h"
"TemporalFilter.h"
"Interpolate.h"
"CarToRas.h"
"EmberToXml.h"
1417770762 /home/heretic/Dev/fractorium/Source/Ember//RendererBase.h
"Utils.h"
"Ember.h"
"DensityFilter.h"
1417776440 /home/heretic/Dev/fractorium/Source/Ember//Utils.h
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Isaac.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Ember.h
"Xform.h"
"PaletteList.h"
"SpatialFilter.h"
"TemporalFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Xform.h
"VariationList.h"
"Interpolate.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//VariationList.h
"Variations01.h"
"Variations02.h"
"Variations03.h"
"Variations04.h"
"Variations05.h"
"VariationsDC.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Variations01.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Variation.h
"Point.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Point.h
"EmberDefines.h"
"Affine2D.h"
"Timing.h"
1417810095 /home/heretic/Dev/fractorium/Source/Ember//Affine2D.h
"Utils.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Variations02.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Variations03.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Variations04.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Variations05.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//VariationsDC.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Interpolate.h
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//PaletteList.h
"Palette.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Palette.h
"Utils.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//SpatialFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//TemporalFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//DensityFilter.h
"SpatialFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//Iterator.h
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//CarToRas.h
"Point.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember//EmberToXml.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
"Ember.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417764380 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLStructs.h
"EmberCLPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLFunctions.h
"EmberCLPch.h"
"EmberCLStructs.h"
1417760119 source:/home/heretic/Dev/fractorium/Source/EmberCL/DllMain.cpp
"EmberCLPch.h"
1417814313 source:/home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp
"EmberCLPch.h"
"FinalAccumOpenCLKernelCreator.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417814434 source:/home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.cpp
"EmberCLPch.h"
"IterOpenCLKernelCreator.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417814434 source:/home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.cpp
"EmberCLPch.h"
"OpenCLWrapper.h"
1417770248 /home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.h
"EmberCLPch.h"
1417829447 source:/home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.cpp
"EmberCLPch.h"
"RendererCL.h"
1417828769 /home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.h
"EmberCLPch.h"
"OpenCLWrapper.h"
"IterOpenCLKernelCreator.h"
"DEOpenCLKernelCreator.h"
"FinalAccumOpenCLKernelCreator.h"

View File

@ -1,4 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Release x64" />
<File name="../../Source/EmberCL/FinalAccumOpenCLKernelCreator.h" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3552" topLine="53" />
</Cursor>
</File>
<File name="../../Source/EmberCL/DEOpenCLKernelCreator.h" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2563" topLine="52" />
</Cursor>
</File>
<File name="../../Source/EmberCL/EmberCLFunctions.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10375" topLine="385" />
</Cursor>
</File>
<File name="../../Source/EmberCL/OpenCLWrapper.cpp" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="46085" topLine="1300" />
</Cursor>
</File>
<File name="../../Source/EmberCL/DllMain.cpp" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberCL/EmberCLStructs.h" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8762" topLine="265" />
</Cursor>
</File>
<File name="../../Source/EmberCL/RendererCL.cpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="57657" topLine="1443" />
</Cursor>
</File>
<File name="../../Source/EmberCL/DEOpenCLKernelCreator.cpp" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="40101" topLine="851" />
</Cursor>
</File>
<File name="../../Source/EmberCL/OpenCLWrapper.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5054" topLine="127" />
</Cursor>
</File>
<File name="../../Source/EmberCL/RendererCL.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7648" topLine="173" />
</Cursor>
</File>
<File name="../../Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="23124" topLine="488" />
</Cursor>
</File>
<File name="../../Source/EmberCL/IterOpenCLKernelCreator.cpp" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="28977" topLine="810" />
</Cursor>
</File>
<File name="../../Source/EmberCL/IterOpenCLKernelCreator.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1445" topLine="29" />
</Cursor>
</File>
<File name="../../Source/EmberCL/EmberCLPch.h" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="794" topLine="13" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -8,159 +8,93 @@
<Build>
<Target title="Debug x64">
<Option output="EmberGenome" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-g" />
<Add option="-D_M_X64" />
<Add option="-D_DEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86_64" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
</Target>
<Target title="ReleaseNvidia Win32">
<Option output="EmberGenome" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
<Option use_console_runner="0" />
</Target>
<Target title="ReleaseNvidia x64">
<Option output="EmberGenome" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
<Option use_console_runner="0" />
</Target>
<Target title="Release x64">
<Option output="EmberGenome" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-O2" />
<Add option="-D_M_X64" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86_64" />
<Add directory="$(CUDA_PATH)lib/Linux" />
<Add option="-s" />
</Linker>
</Target>
<Target title="Release Win32">
<Option output="EmberGenome" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
<Option use_console_runner="0" />
</Target>
<Target title="Debug Win32">
<Option output="EmberGenome" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-D_DEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
<Option use_console_runner="0" />
</Target>
</Build>
<Compiler>
<Add option="-march=k8" />
<Add option="-fomit-frame-pointer" />
<Add option="-Wnon-virtual-dtor" />
<Add option="-Wshadow" />
<Add option="-Winit-self" />
<Add option="-Wredundant-decls" />
<Add option="-Wcast-align" />
<Add option="-Wunreachable-code" />
<Add option="-Wswitch-enum" />
<Add option="-Wswitch-default" />
<Add option="-Wmain" />
<Add option="-Wzero-as-null-pointer-constant" />
<Add option="-std=c++11" />
<Add option="-Wfatal-errors" />
<Add option="-Wall" />
<Add option="-fpermissive" />
<Add option="-fPIC" />
<Add directory="/usr/include/libxml2" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../Source/EmberCommon" />
</Compiler>
<Linker>
<Add library="libxml2" />
<Add library="tbb" />
<Add library="OpenCL" />
<Add library="jpeg" />
<Add library="libpng" />
<Add library="Ember" />
<Add library="EmberCL" />
<Add directory="./" />
</Linker>
<ExtraCommands>
<Add after="cp --update ../../Data/flam3-palettes.xml ./flam3-palettes.xml" />
<Mode after="always" />
</ExtraCommands>
<Unit filename="../../Source/EmberCommon/EmberCommon.h" />
<Unit filename="../../Source/EmberCommon/EmberCommonPch.cpp" />
<Unit filename="../../Source/EmberCommon/EmberCommonPch.h" />
@ -170,10 +104,8 @@
<Unit filename="../../Source/EmberCommon/SimpleOpt.h" />
<Unit filename="../../Source/EmberGenome/EmberGenome.cpp" />
<Unit filename="../../Source/EmberGenome/EmberGenome.h" />
<Unit filename="../../Source/EmberGenome/EmberGenome.rc" />
<Unit filename="../../Source/EmberGenome/resource.h" />
<Unit filename="../../Source/Fractorium/Icons/Fractorium.ico" />
<Unit filename="ReadMe.txt" />
<Extensions>
<code_completion />
<debugger />

View File

@ -0,0 +1,392 @@
# depslib dependency file v1.0
1417760119 source:/home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.cpp
"EmberCommonPch.h"
1417812217 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.h
<SDKDDKVer.h>
<windows.h>
<winsock.h>
<BaseTsd.h>
<crtdbg.h>
<tchar.h>
<arpa/inet.h>
<iostream>
<iomanip>
<ostream>
<sstream>
<setjmp.h>
<stdio.h>
<stdlib.h>
<string.h>
"jconfig.h"
"jpeglib.h"
"png.h"
"Ember.h"
"Variation.h"
"EmberToXml.h"
"XmlToEmber.h"
"PaletteList.h"
"Iterator.h"
"Renderer.h"
"RendererCL.h"
"SheepTools.h"
"SimpleGlob.h"
"SimpleOpt.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
"Xform.h"
"PaletteList.h"
"SpatialFilter.h"
"TemporalFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
"VariationList.h"
"Interpolate.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
"Variations01.h"
"Variations02.h"
"Variations03.h"
"Variations04.h"
"Variations05.h"
"VariationsDC.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
"Point.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Point.h
"EmberDefines.h"
"Affine2D.h"
"Timing.h"
1417811373 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
"EmberPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
<SDKDDKVer.h>
<windows.h>
<libgen.h>
<unistd.h>
<algorithm>
<chrono>
<complex>
<cstdint>
<fstream>
<functional>
<inttypes.h>
<iostream>
<iomanip>
<limits>
<malloc.h>
<math.h>
<memory>
<numeric>
<ostream>
<sstream>
<sys/types.h>
<sys/stat.h>
<thread>
<time.h>
<vector>
"libxml/parser.h"
"libxml2/libxml/parser.h"
"tbb/task_group.h"
"tbb/parallel_for.h"
"tbb/task_scheduler_init.h"
"glm/glm.hpp"
"glm/gtc/matrix_transform.hpp"
"glm/gtc/type_ptr.hpp"
"glm/gtx/string_cast.hpp"
1402664682 /usr/include/libxml2/libxml/parser.h
<stdarg.h>
<libxml/xmlversion.h>
<libxml/tree.h>
<libxml/dict.h>
<libxml/hash.h>
<libxml/valid.h>
<libxml/entities.h>
<libxml/xmlerror.h>
<libxml/xmlstring.h>
<libxml/encoding.h>
<libxml/xmlIO.h>
<libxml/globals.h>
1402664682 /usr/include/libxml2/libxml/xmlversion.h
<libxml/xmlexports.h>
<ansidecl.h>
1402664682 /usr/include/libxml2/libxml/xmlexports.h
1402664682 /usr/include/libxml2/libxml/tree.h
<stdio.h>
<limits.h>
<libxml/xmlversion.h>
<libxml/xmlstring.h>
<libxml/xmlregexp.h>
<libxml/xmlmemory.h>
1402664682 /usr/include/libxml2/libxml/xmlstring.h
<stdarg.h>
<libxml/xmlversion.h>
1402664682 /usr/include/libxml2/libxml/xmlregexp.h
<libxml/xmlversion.h>
<libxml/tree.h>
<libxml/dict.h>
1402664682 /usr/include/libxml2/libxml/dict.h
<limits.h>
<libxml/xmlversion.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/xmlmemory.h
<stdio.h>
<libxml/xmlversion.h>
<libxml/threads.h>
<libxml/globals.h>
1402664682 /usr/include/libxml2/libxml/threads.h
<libxml/xmlversion.h>
<libxml/globals.h>
1402664682 /usr/include/libxml2/libxml/globals.h
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/xmlerror.h>
<libxml/SAX.h>
<libxml/SAX2.h>
<libxml/xmlmemory.h>
<libxml/threads.h>
1402664682 /usr/include/libxml2/libxml/xmlerror.h
<libxml/parser.h>
1402664682 /usr/include/libxml2/libxml/SAX.h
<stdio.h>
<stdlib.h>
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/xlink.h>
1402664682 /usr/include/libxml2/libxml/xlink.h
<libxml/xmlversion.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/SAX2.h
<stdio.h>
<stdlib.h>
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/xlink.h>
1402664682 /usr/include/libxml2/libxml/hash.h
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/dict.h>
1402664682 /usr/include/libxml2/libxml/valid.h
<libxml/xmlversion.h>
<libxml/xmlerror.h>
<libxml/tree.h>
<libxml/list.h>
<libxml/xmlautomata.h>
<libxml/xmlregexp.h>
1402664682 /usr/include/libxml2/libxml/list.h
<libxml/xmlversion.h>
1402664682 /usr/include/libxml2/libxml/xmlautomata.h
<libxml/xmlversion.h>
<libxml/tree.h>
<libxml/xmlregexp.h>
1402664682 /usr/include/libxml2/libxml/entities.h
<libxml/xmlversion.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/encoding.h
<libxml/xmlversion.h>
<iconv.h>
<unicode/ucnv.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/xmlIO.h
<stdio.h>
<libxml/xmlversion.h>
<libxml/globals.h>
<libxml/tree.h>
<libxml/parser.h>
<libxml/encoding.h>
1417810095 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
"Utils.h"
1417776440 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
"Palette.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
"Utils.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
"Ember.h"
1417810944 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
"RendererBase.h"
"Iterator.h"
"SpatialFilter.h"
"TemporalFilter.h"
"Interpolate.h"
"CarToRas.h"
"EmberToXml.h"
1417770762 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
"Utils.h"
"Ember.h"
"DensityFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
"SpatialFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
"Point.h"
1417828769 /home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.h
"EmberCLPch.h"
"OpenCLWrapper.h"
"IterOpenCLKernelCreator.h"
"DEOpenCLKernelCreator.h"
"FinalAccumOpenCLKernelCreator.h"
1417766202 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLPch.h
"Timing.h"
"Renderer.h"
<windows.h>
<SDKDDKVer.h>
"GL/glx.h"
<utility>
<CL/cl.hpp>
<algorithm>
<cstdio>
<cstdlib>
<fstream>
<iostream>
<string>
<iterator>
<time.h>
1417770248 /home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.h
"EmberCLPch.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417764380 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLStructs.h
"EmberCLPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLFunctions.h
"EmberCLPch.h"
"EmberCLStructs.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
"EmberDefines.h"
"Isaac.h"
"VariationList.h"
"Renderer.h"
1417816836 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleGlob.h
<mbstring.h>
<sys/types.h>
<sys/stat.h>
<glob.h>
<limits.h>
<stdlib.h>
<string.h>
<wchar.h>
<crtdbg.h>
<assert.h>
1417817700 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleOpt.h
<stdlib.h>
<string.h>
<crtdbg.h>
<assert.h>
1417823420 source:/home/heretic/Dev/fractorium/Source/EmberGenome/EmberGenome.cpp
"EmberCommonPch.h"
"EmberGenome.h"
"JpegUtils.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberGenome/EmberGenome.h
"EmberOptions.h"
1417774919 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberOptions.h
"EmberCommon.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommon.h
"EmberCommonPch.h"
1417775759 /home/heretic/Dev/fractorium/Source/EmberCommon/JpegUtils.h
"EmberCommonPch.h"

View File

@ -1,17 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Release x64" />
<File name="../../Source/EmberCommon/EmberCommon.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/EmberCommon/EmberCommon.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/EmberOptions.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/JpegUtils.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/SimpleGlob.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/SimpleOpt.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
<Folding>
<Collapse line="17" />
</Folding>
</File>
<File name="../../Source/EmberCommon/EmberCommonPch.cpp" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/EmberCommonPch.h" open="1" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -8,10 +8,12 @@
<Build>
<Target title="Debug x64">
<Option output="EmberRender" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-g" />
<Add option="-D_M_X64" />
<Add option="-D_DEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
@ -25,21 +27,13 @@
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86_64" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
</Target>
<Target title="ReleaseNvidia Win32">
<Option output="EmberRender" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
@ -51,21 +45,13 @@
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
</Target>
<Target title="ReleaseNvidia x64">
<Option output="EmberRender" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
@ -76,46 +62,28 @@
<Add directory="../../../libxml2/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
</Target>
<Target title="Release x64">
<Option output="EmberRender" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-O2" />
<Add option="-D_M_X64" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../../glm" />
<Add directory="../../../tbb/include" />
<Add directory="../../../libjpeg" />
<Add directory="../../../libpng" />
<Add directory="../../../libxml2/include" />
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86_64" />
<Add directory="$(CUDA_PATH)lib/Linux" />
<Add option="-s" />
</Linker>
</Target>
<Target title="Release Win32">
<Option output="EmberRender" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-DNDEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
@ -127,21 +95,13 @@
<Add directory="$(AMDAPPSDKROOT)/include" />
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
</Target>
<Target title="Debug Win32">
<Option output="EmberRender" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-DWIN32" />
<Add option="-D_DEBUG" />
<Add option="-D_CONSOLE" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCommon" />
<Add directory="../../Source/EmberCL" />
@ -154,14 +114,47 @@
<Add directory="$(CUDA_PATH)include" />
</Compiler>
<Linker>
<Add library="opencl.lib" />
<Add library="Ws2_32.lib" />
<Add directory="$(AMDAPPSDKROOT)/lib/x86" />
<Add directory="$(CUDA_PATH)lib/Linux" />
</Linker>
</Target>
</Build>
<Unit filename="../../EmberRender/EmberRender.rc" />
<Compiler>
<Add option="-march=k8" />
<Add option="-fomit-frame-pointer" />
<Add option="-Wnon-virtual-dtor" />
<Add option="-Wshadow" />
<Add option="-Winit-self" />
<Add option="-Wredundant-decls" />
<Add option="-Wcast-align" />
<Add option="-Wunreachable-code" />
<Add option="-Wswitch-enum" />
<Add option="-Wswitch-default" />
<Add option="-Wmain" />
<Add option="-Wzero-as-null-pointer-constant" />
<Add option="-std=c++11" />
<Add option="-Wfatal-errors" />
<Add option="-Wall" />
<Add option="-fpermissive" />
<Add option="-fPIC" />
<Add directory="/usr/include/libxml2" />
<Add directory="../../Source/Ember" />
<Add directory="../../Source/EmberCL" />
<Add directory="../../Source/EmberCommon" />
</Compiler>
<Linker>
<Add library="jpeg" />
<Add library="libpng" />
<Add library="Ember" />
<Add library="EmberCL" />
<Add library="libxml2" />
<Add library="OpenCL" />
<Add library="tbb" />
<Add directory="./" />
</Linker>
<ExtraCommands>
<Add after="cp --update ../../Data/flam3-palettes.xml ./flam3-palettes.xml" />
<Mode after="always" />
</ExtraCommands>
<Unit filename="../../Fractorium/Icons/Fractorium.ico" />
<Unit filename="../../Source/EmberCommon/EmberCommon.h" />
<Unit filename="../../Source/EmberCommon/EmberCommonPch.cpp" />
@ -173,7 +166,6 @@
<Unit filename="../../Source/EmberRender/EmberRender.cpp" />
<Unit filename="../../Source/EmberRender/EmberRender.h" />
<Unit filename="../../Source/EmberRender/resource.h" />
<Unit filename="ReadMe.txt" />
<Extensions>
<code_completion />
<debugger />

View File

@ -0,0 +1,392 @@
# depslib dependency file v1.0
1417760119 source:/home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.cpp
"EmberCommonPch.h"
1417812217 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommonPch.h
<SDKDDKVer.h>
<windows.h>
<winsock.h>
<BaseTsd.h>
<crtdbg.h>
<tchar.h>
<arpa/inet.h>
<iostream>
<iomanip>
<ostream>
<sstream>
<setjmp.h>
<stdio.h>
<stdlib.h>
<string.h>
"jconfig.h"
"jpeglib.h"
"png.h"
"Ember.h"
"Variation.h"
"EmberToXml.h"
"XmlToEmber.h"
"PaletteList.h"
"Iterator.h"
"Renderer.h"
"RendererCL.h"
"SheepTools.h"
"SimpleGlob.h"
"SimpleOpt.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Ember.h
"Xform.h"
"PaletteList.h"
"SpatialFilter.h"
"TemporalFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Xform.h
"VariationList.h"
"Interpolate.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationList.h
"Variations01.h"
"Variations02.h"
"Variations03.h"
"Variations04.h"
"Variations05.h"
"VariationsDC.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations01.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variation.h
"Point.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Point.h
"EmberDefines.h"
"Affine2D.h"
"Timing.h"
1417811373 /home/heretic/Dev/fractorium/Source/Ember/EmberDefines.h
"EmberPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberPch.h
<SDKDDKVer.h>
<windows.h>
<libgen.h>
<unistd.h>
<algorithm>
<chrono>
<complex>
<cstdint>
<fstream>
<functional>
<inttypes.h>
<iostream>
<iomanip>
<limits>
<malloc.h>
<math.h>
<memory>
<numeric>
<ostream>
<sstream>
<sys/types.h>
<sys/stat.h>
<thread>
<time.h>
<vector>
"libxml/parser.h"
"libxml2/libxml/parser.h"
"tbb/task_group.h"
"tbb/parallel_for.h"
"tbb/task_scheduler_init.h"
"glm/glm.hpp"
"glm/gtc/matrix_transform.hpp"
"glm/gtc/type_ptr.hpp"
"glm/gtx/string_cast.hpp"
1402664682 /usr/include/libxml2/libxml/parser.h
<stdarg.h>
<libxml/xmlversion.h>
<libxml/tree.h>
<libxml/dict.h>
<libxml/hash.h>
<libxml/valid.h>
<libxml/entities.h>
<libxml/xmlerror.h>
<libxml/xmlstring.h>
<libxml/encoding.h>
<libxml/xmlIO.h>
<libxml/globals.h>
1402664682 /usr/include/libxml2/libxml/xmlversion.h
<libxml/xmlexports.h>
<ansidecl.h>
1402664682 /usr/include/libxml2/libxml/xmlexports.h
1402664682 /usr/include/libxml2/libxml/tree.h
<stdio.h>
<limits.h>
<libxml/xmlversion.h>
<libxml/xmlstring.h>
<libxml/xmlregexp.h>
<libxml/xmlmemory.h>
1402664682 /usr/include/libxml2/libxml/xmlstring.h
<stdarg.h>
<libxml/xmlversion.h>
1402664682 /usr/include/libxml2/libxml/xmlregexp.h
<libxml/xmlversion.h>
<libxml/tree.h>
<libxml/dict.h>
1402664682 /usr/include/libxml2/libxml/dict.h
<limits.h>
<libxml/xmlversion.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/xmlmemory.h
<stdio.h>
<libxml/xmlversion.h>
<libxml/threads.h>
<libxml/globals.h>
1402664682 /usr/include/libxml2/libxml/threads.h
<libxml/xmlversion.h>
<libxml/globals.h>
1402664682 /usr/include/libxml2/libxml/globals.h
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/xmlerror.h>
<libxml/SAX.h>
<libxml/SAX2.h>
<libxml/xmlmemory.h>
<libxml/threads.h>
1402664682 /usr/include/libxml2/libxml/xmlerror.h
<libxml/parser.h>
1402664682 /usr/include/libxml2/libxml/SAX.h
<stdio.h>
<stdlib.h>
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/xlink.h>
1402664682 /usr/include/libxml2/libxml/xlink.h
<libxml/xmlversion.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/SAX2.h
<stdio.h>
<stdlib.h>
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/xlink.h>
1402664682 /usr/include/libxml2/libxml/hash.h
<libxml/xmlversion.h>
<libxml/parser.h>
<libxml/dict.h>
1402664682 /usr/include/libxml2/libxml/valid.h
<libxml/xmlversion.h>
<libxml/xmlerror.h>
<libxml/tree.h>
<libxml/list.h>
<libxml/xmlautomata.h>
<libxml/xmlregexp.h>
1402664682 /usr/include/libxml2/libxml/list.h
<libxml/xmlversion.h>
1402664682 /usr/include/libxml2/libxml/xmlautomata.h
<libxml/xmlversion.h>
<libxml/tree.h>
<libxml/xmlregexp.h>
1402664682 /usr/include/libxml2/libxml/entities.h
<libxml/xmlversion.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/encoding.h
<libxml/xmlversion.h>
<iconv.h>
<unicode/ucnv.h>
<libxml/tree.h>
1402664682 /usr/include/libxml2/libxml/xmlIO.h
<stdio.h>
<libxml/xmlversion.h>
<libxml/globals.h>
<libxml/tree.h>
<libxml/parser.h>
<libxml/encoding.h>
1417810095 /home/heretic/Dev/fractorium/Source/Ember/Affine2D.h
"Utils.h"
1417776440 /home/heretic/Dev/fractorium/Source/Ember/Utils.h
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Isaac.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Timing.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations02.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations03.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations04.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Variations05.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/VariationsDC.h
"Variation.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Interpolate.h
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/PaletteList.h
"Palette.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Palette.h
"Utils.h"
"Isaac.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SpatialFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/TemporalFilter.h
"EmberDefines.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/EmberToXml.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
"Ember.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/XmlToEmber.h
"Utils.h"
"PaletteList.h"
"VariationList.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/Iterator.h
"Ember.h"
1417810944 /home/heretic/Dev/fractorium/Source/Ember/Renderer.h
"RendererBase.h"
"Iterator.h"
"SpatialFilter.h"
"TemporalFilter.h"
"Interpolate.h"
"CarToRas.h"
"EmberToXml.h"
1417770762 /home/heretic/Dev/fractorium/Source/Ember/RendererBase.h
"Utils.h"
"Ember.h"
"DensityFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/DensityFilter.h
"SpatialFilter.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/CarToRas.h
"Point.h"
1417828769 /home/heretic/Dev/fractorium/Source/EmberCL/RendererCL.h
"EmberCLPch.h"
"OpenCLWrapper.h"
"IterOpenCLKernelCreator.h"
"DEOpenCLKernelCreator.h"
"FinalAccumOpenCLKernelCreator.h"
1417766202 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLPch.h
"Timing.h"
"Renderer.h"
<windows.h>
<SDKDDKVer.h>
"GL/glx.h"
<utility>
<CL/cl.hpp>
<algorithm>
<cstdio>
<cstdlib>
<fstream>
<iostream>
<string>
<iterator>
<time.h>
1417770248 /home/heretic/Dev/fractorium/Source/EmberCL/OpenCLWrapper.h
"EmberCLPch.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/IterOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417764380 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLStructs.h
"EmberCLPch.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCL/EmberCLFunctions.h
"EmberCLPch.h"
"EmberCLStructs.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/DEOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417816098 /home/heretic/Dev/fractorium/Source/EmberCL/FinalAccumOpenCLKernelCreator.h
"EmberCLPch.h"
"EmberCLStructs.h"
"EmberCLFunctions.h"
1417760119 /home/heretic/Dev/fractorium/Source/Ember/SheepTools.h
"EmberDefines.h"
"Isaac.h"
"VariationList.h"
"Renderer.h"
1417816836 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleGlob.h
<mbstring.h>
<sys/types.h>
<sys/stat.h>
<glob.h>
<limits.h>
<stdlib.h>
<string.h>
<wchar.h>
<crtdbg.h>
<assert.h>
1417817700 /home/heretic/Dev/fractorium/Source/EmberCommon/SimpleOpt.h
<stdlib.h>
<string.h>
<crtdbg.h>
<assert.h>
1417826935 source:/home/heretic/Dev/fractorium/Source/EmberRender/EmberRender.cpp
"EmberCommonPch.h"
"EmberRender.h"
"JpegUtils.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberRender/EmberRender.h
"EmberOptions.h"
1417774919 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberOptions.h
"EmberCommon.h"
1417760119 /home/heretic/Dev/fractorium/Source/EmberCommon/EmberCommon.h
"EmberCommonPch.h"
1417775759 /home/heretic/Dev/fractorium/Source/EmberCommon/JpegUtils.h
"EmberCommonPch.h"

View File

@ -1,14 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Release x64" />
<File name="../../Source/EmberCommon/EmberCommon.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/EmberCommon/EmberCommonPch.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="108" />
<Cursor1 position="546" topLine="0" />
</Cursor>
</File>
<File name="../../Source/EmberRender/EmberRender.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="../../Source/EmberCommon/SimpleOpt.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="526" topLine="0" />
<Cursor1 position="23911" topLine="734" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/SimpleGlob.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="28795" topLine="894" />
</Cursor>
</File>
<File name="../../Source/EmberRender/EmberRender.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11058" topLine="309" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/EmberOptions.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="32737" topLine="469" />
</Cursor>
</File>
<File name="../../Source/EmberCommon/JpegUtils.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10816" topLine="287" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="Workspace">
<Project filename="./Ember.cbp" />
<Project filename="./EmberCL.cbp" />
<Project filename="./EmberGenome.cbp" />
<Project filename="./EmberAnimate.cbp" />
<Project filename="./EmberRender.cbp" />
<Project filename="Ember.cbp" />
<Project filename="EmberCL.cbp" />
<Project filename="EmberGenome.cbp" />
<Project filename="EmberAnimate.cbp" />
<Project filename="EmberRender.cbp">
<Depends filename="Ember.cbp" />
<Depends filename="EmberCL.cbp" />
</Project>
</Workspace>
</CodeBlocks_workspace_file>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_layout_file>
<ActiveProject path="EmberCL.cbp" />
<ActiveProject path="EmberRender.cbp" />
</CodeBlocks_workspace_layout_file>

View File

@ -166,7 +166,7 @@ void Affine2D<T>::Rotate(T angle)
{
m4T origMat4 = ToMat4ColMajor(true);//Must center and use column major for glm to work.
m4T newMat4 = glm::rotate(origMat4, angle * DEG_2_RAD_T, v3T(0, 0, 1));//Assuming only rotating around z.
A(newMat4[0][0]);//Use direct assignments instead of constructor to skip assigning C and F.
B(newMat4[0][1]);
D(newMat4[1][0]);
@ -357,4 +357,13 @@ void Affine2D<T>::CalcRSAC(const v2T& from, const v2T& to, T& a, T& c)
a = (from.y * to.y + from.x * to.x) / lsq;
c = (from.x * to.y - from.y * to.x) / lsq;
}
}
//This class had to be implemented in a cpp file because the compiler was breaking.
//So the explicit instantiation must be declared here rather than in Ember.cpp where
//all of the other classes are done.
template EMBER_API class Affine2D<float>;
#ifdef DO_DOUBLE
template EMBER_API class Affine2D<double>;
#endif
}

View File

@ -117,9 +117,9 @@ public:
//This class had to be implemented in a cpp file because the compiler was breaking.
//So the explicit instantiation must be declared here rather than in Ember.cpp where
//all of the other classes are done.
template EMBER_API class Affine2D<float>;
//template EMBER_API class Affine2D<float>;
#ifdef DO_DOUBLE
template EMBER_API class Affine2D<double>;
#endif
}
//#ifdef DO_DOUBLE
// template EMBER_API class Affine2D<double>;
//#endif
}

View File

@ -20,22 +20,28 @@
#define _stricmp strcmp
#define sscanf_s sscanf
#define sprintf_s snprintf
#define snprintf_s snprintf
typedef int errno_t;
#endif
#define RESTRICT __restrict//This might make things faster, unsure if it really does though.
//#define RESTRICT
namespace EmberNs
{
//Wrap the sincos function for Macs and PC.
#if defined(__APPLE__) || defined(_MSC_VER)
#define sincos(x, s, c) *(s)=sin(x); *(c)=cos(x);
#else
extern void sincos(double x, double *s, double *c);
extern void sincos(float x, float *s, float *c);
//extern void sincos(double x, double *s, double *c);
//extern void sincos(float x, float *s, float *c);
static void sincos(float x, float* s, float* c)
{
*s = sin(x);
*c = cos(x);
}
#endif
namespace EmberNs
{
#define EMBER_VERSION "0.4.1.6"
#define EPS6 T(1e-6)
#define EPS std::numeric_limits<T>::epsilon()//Apoplugin.h uses -20, but it's more mathematically correct to do it this way.

View File

@ -1588,4 +1588,13 @@ void Renderer<T, bucketT>::GammaCorrection(glm::detail::tvec4<bucketT, glm::defa
correctedChannels[3] = numeric_limits<accumT>::max();//Final accum, 4 channels, but not using transparency. 255 for 8 bpc, 65535 for 16 bpc.
}
}
//This class had to be implemented in a cpp file because the compiler was breaking.
//So the explicit instantiation must be declared here rather than in Ember.cpp where
//all of the other classes are done.
template EMBER_API class Renderer<float, float>;
#ifdef DO_DOUBLE
template EMBER_API class Renderer<double, double>;
#endif
}

View File

@ -45,6 +45,7 @@ namespace EmberNs
template <typename T, typename bucketT>
class EMBER_API Renderer : public RendererBase
{
//using EmberReport::m_ErrorReport;
public:
Renderer();
virtual ~Renderer();
@ -189,9 +190,9 @@ protected:
//This class had to be implemented in a cpp file because the compiler was breaking.
//So the explicit instantiation must be declared here rather than in Ember.cpp where
//all of the other classes are done.
template EMBER_API class Renderer<float, float>;
//template EMBER_API class Renderer<float, float>;
#ifdef DO_DOUBLE
template EMBER_API class Renderer<double, double>;
#endif
//#ifdef DO_DOUBLE
// template EMBER_API class Renderer<double, double>;
//#endif
}

View File

@ -91,6 +91,7 @@ enum eRendererType { CPU_RENDERER, OPENCL_RENDERER };
/// </summary>
class EMBER_API RendererBase : public EmberReport
{
//using EmberReport::m_ErrorReport;
public:
RendererBase();
virtual ~RendererBase() { }
@ -210,8 +211,8 @@ protected:
size_t m_ThreadsToUse;
size_t m_VibGamCount;
size_t m_LastTemporalSample;
double m_LastIterPercent;
size_t m_LastIter;
double m_LastIterPercent;
eProcessAction m_ProcessAction;
eProcessState m_ProcessState;
eInteractiveFilter m_InteractiveFilter;

View File

@ -132,20 +132,20 @@ public:
/// Add a vector of strings to report.
/// </summary>
/// <param name="vec">The vector of strings to add</param>
virtual void AddToReport(vector<string>& vec) { m_ErrorReport.insert(m_ErrorReport.end(), vec.begin(), vec.end()); }
virtual void AddToReport(const vector<string>& vec) { m_ErrorReport.insert(m_ErrorReport.end(), vec.begin(), vec.end()); }
/// <summary>
/// Static function to dump a vector of strings passed in.
/// </summary>
/// <param name="errorReport">The vector of strings to dump</param>
static void StaticDumpErrorReport(vector<string>& errorReport) { cout << StaticErrorReportString(errorReport); }
static void StaticDumpErrorReport(const vector<string>& errorReport) { cout << StaticErrorReportString(errorReport); }
/// <summary>
/// Static function to return the entire error report passed in as a single string.
/// </summary>
/// <param name="errorReport">The vector of strings to concatenate</param>
/// <returns>A string containing all strings in the vector passed in separated by newlines</returns>
static string StaticErrorReportString(vector<string>& errorReport)
static string StaticErrorReportString(const vector<string>& errorReport)
{
stringstream ss;
@ -835,7 +835,7 @@ static string GetPath(const string& filename)
{
string s;
const size_t lastSlash = filename.find_last_of("\\/");
if (std::string::npos != lastSlash)
s = filename.substr(0, lastSlash + 1);
else

View File

@ -1,7 +1,7 @@
#include "EmberCommonPch.h"
#include "EmberAnimate.h"
#include "JpegUtils.h"
/// <summary>
/// The core of the EmberAnimate.exe program.
/// Template argument expected to be float or double.
@ -17,7 +17,7 @@ bool EmberAnimate(EmberOptions& opt)
if (opt.DumpArgs())
cout << opt.GetValues(OPT_USE_ANIMATE) << endl;
if (opt.OpenCLInfo())
{
cout << "\nOpenCL Info: " << endl;
@ -59,7 +59,7 @@ bool EmberAnimate(EmberOptions& opt)
if (opt.EmberCL() && renderer->RendererType() != OPENCL_RENDERER)//OpenCL init failed, so fall back to CPU.
opt.EmberCL(false);
if (!InitPaletteList<T>(opt.PalettePath()))
return false;
@ -78,7 +78,7 @@ bool EmberAnimate(EmberOptions& opt)
cout << "Using " << opt.ThreadCount() << " manually specified threads." << endl;
}
renderer->ThreadCount(opt.ThreadCount(), opt.IsaacSeed() != "" ? opt.IsaacSeed().c_str() : NULL);
renderer->ThreadCount(opt.ThreadCount(), opt.IsaacSeed() != "" ? opt.IsaacSeed().c_str() : nullptr);
}
else
{
@ -94,7 +94,7 @@ bool EmberAnimate(EmberOptions& opt)
cout << "Cannot specify threads with OpenCL, using 1 thread." << endl;
opt.ThreadCount(1);
renderer->ThreadCount(opt.ThreadCount(), opt.IsaacSeed() != "" ? opt.IsaacSeed().c_str() : NULL);
renderer->ThreadCount(opt.ThreadCount(), opt.IsaacSeed() != "" ? opt.IsaacSeed().c_str() : nullptr);
if (opt.BitsPerChannel() != 8)
{
@ -110,9 +110,9 @@ bool EmberAnimate(EmberOptions& opt)
{
cout << "Format must be jpg, png, ppm, or bmp not " << opt.Format() << ". Setting to jpg." << endl;
}
channels = opt.Format() == "png" ? 4 : 3;
if (opt.BitsPerChannel() == 16 && opt.Format() != "png")
{
cout << "Support for 16 bits per channel images is only present for the png format. Setting to 8." << endl;
@ -135,13 +135,13 @@ bool EmberAnimate(EmberOptions& opt)
cout << "Invalid pixel aspect ratio " << opt.AspectRatio() << endl << ". Must be positive, setting to 1." << endl;
opt.AspectRatio(1);
}
if (opt.Dtime() < 1)
{
cout << "Warning: dtime must be positive, not " << opt.Dtime() << ". Setting to 1." << endl;
opt.Dtime(1);
}
if (opt.Frame())
{
if (opt.Time())
@ -182,7 +182,7 @@ bool EmberAnimate(EmberOptions& opt)
{
if (i > 0 && embers[i].m_Time <= embers[i - 1].m_Time)
unsorted = true;
if (opt.Supersample() > 0)
embers[i].m_Supersample = opt.Supersample();
@ -193,43 +193,43 @@ bool EmberAnimate(EmberOptions& opt)
embers[i].m_FinalRasW = (unsigned int)((T)embers[i].m_FinalRasW * opt.SizeScale());
embers[i].m_FinalRasH = (unsigned int)((T)embers[i].m_FinalRasH * opt.SizeScale());
embers[i].m_PixelsPerUnit *= T(opt.SizeScale());
//Cast to double in case the value exceeds 2^32.
double imageMem = (double)channels * (double)embers[i].m_FinalRasW
double imageMem = (double)channels * (double)embers[i].m_FinalRasW
* (double)embers[i].m_FinalRasH * (double)renderer->BytesPerChannel();
double maxMem = pow(2.0, double((sizeof(void*) * 8) - 1));
if (imageMem > maxMem)//Ensure the max amount of memory for a process isn't exceeded.
{
cout << "Image " << i << " size > " << maxMem << ". Setting to 1920 x 1080." << endl;
embers[i].m_FinalRasW = 1920;
embers[i].m_FinalRasH = 1080;
}
if (embers[i].m_FinalRasW == 0 || embers[i].m_FinalRasH == 0)
{
cout << "Warning: Output image " << i << " has dimension 0: " << embers[i].m_FinalRasW << ", " << embers[i].m_FinalRasH << ". Setting to 1920 x 1080." << endl;
embers[i].m_FinalRasW = 1920;
embers[i].m_FinalRasH = 1080;
}
if ((embers[i].m_FinalRasW != embers[0].m_FinalRasW) ||
(embers[i].m_FinalRasH != embers[0].m_FinalRasH))
{
cout << "Warning: flame " << i << " at time " << embers[i].m_Time << " size mismatch. (" << embers[i].m_FinalRasW << ", " << embers[i].m_FinalRasH <<
") should be (" << embers[0].m_FinalRasW << ", " << embers[0].m_FinalRasH << "). Setting to " << embers[0].m_FinalRasW << ", " << embers[0].m_FinalRasH << "." << endl;
embers[i].m_FinalRasW = embers[0].m_FinalRasW;
embers[i].m_FinalRasH = embers[0].m_FinalRasH;
}
}
if (unsorted)
{
cout << "Embers were unsorted by time. First out of order index was " << i << ". Sorting." << endl;
std::sort(embers.begin(), embers.end(), &CompareEmbers<T>);
}
if (!opt.Time() && !opt.Frame())
{
if (opt.FirstFrame() == UINT_MAX)
@ -238,7 +238,7 @@ bool EmberAnimate(EmberOptions& opt)
if (opt.LastFrame() == UINT_MAX)
opt.LastFrame(ClampGte<unsigned int>((unsigned int)embers.back().m_Time - 1, opt.FirstFrame()));
}
if (!opt.Out().empty())
{
appendXml = true;
@ -257,7 +257,7 @@ bool EmberAnimate(EmberOptions& opt)
renderer->Transparency(opt.Transparency());
renderer->NumChannels(channels);
renderer->BytesPerChannel(opt.BitsPerChannel() / 8);
renderer->Callback(opt.DoProgress() ? progress.get() : NULL);
renderer->Callback(opt.DoProgress() ? progress.get() : nullptr);
//Begin run.
for (ftime = opt.FirstFrame(); ftime <= opt.LastFrame(); ftime += opt.Dtime())
@ -282,7 +282,7 @@ bool EmberAnimate(EmberOptions& opt)
os << inputPath << opt.Prefix() << setfill('0') << setw(5) << ftime << opt.Suffix() << "." << opt.Format();
filename = os.str();
}
if (opt.WriteGenome())
{
flameName = filename.substr(0, filename.find_last_of('.')) + ".flam3";
@ -294,10 +294,10 @@ bool EmberAnimate(EmberOptions& opt)
startXml = ftime == opt.FirstFrame();
finishXml = ftime == opt.LastFrame();
}
emberToXml.Save(flameName, centerEmber, opt.PrintEditDepth(), true, opt.IntPalette(), opt.HexPalette(), true, startXml, finishXml);
}
writeSuccess = false;
stats = renderer->Stats();
comments = renderer->ImageComments(stats, opt.PrintEditDepth(), opt.IntPalette(), opt.HexPalette());
@ -309,7 +309,7 @@ bool EmberAnimate(EmberOptions& opt)
VerbosePrint("Bad values: " << stats.m_Badvals);
VerbosePrint("Render time: " + t.Format(stats.m_RenderMs));
VerbosePrint("Pure iter time: " + t.Format(stats.m_IterMs));
VerbosePrint("Iters/sec: " << unsigned __int64(stats.m_Iters / (stats.m_IterMs / 1000.0)) << endl);
VerbosePrint("Iters/sec: " << size_t(stats.m_Iters / (stats.m_IterMs / 1000.0)) << endl);
VerbosePrint("Writing " + filename);
if ((opt.Format() == "jpg" || opt.Format() == "bmp") && renderer->NumChannels() == 4)
@ -331,13 +331,13 @@ bool EmberAnimate(EmberOptions& opt)
writeSuccess = WritePpm(filename.c_str(), finalImagep, renderer->FinalRasW(), renderer->FinalRasH());
else if (opt.Format() == "bmp")
writeSuccess = WriteBmp(filename.c_str(), finalImagep, renderer->FinalRasW(), renderer->FinalRasH());
if (!writeSuccess)
cout << "Error writing " << filename << endl;
centerEmber.Clear();
}
VerbosePrint("Done.\n");
return true;
}
@ -350,32 +350,37 @@ bool EmberAnimate(EmberOptions& opt)
/// <returns>0 if successful, else 1.</returns>
int _tmain(int argc, _TCHAR* argv[])
{
bool b, d = true;
bool b = false;
EmberOptions opt;
//Required for large allocs, else GPU memory usage will be severely limited to small sizes.
//This must be done in the application and not in the EmberCL DLL.
#ifdef WIN32
_putenv_s("GPU_MAX_ALLOC_PERCENT", "100");
#else
putenv((char*)"GPU_MAX_ALLOC_PERCENT=100");
#endif
if (opt.Populate(argc, argv, OPT_USE_ANIMATE))
return 0;
if (!opt.Populate(argc, argv, OPT_USE_ANIMATE))
{
#ifdef DO_DOUBLE
if (opt.Bits() == 64)
{
b = EmberAnimate<double, double>(opt);
}
else
if (opt.Bits() == 64)
{
b = EmberAnimate<double, double>(opt);
}
else
#endif
if (opt.Bits() == 33)
{
b = EmberAnimate<float, float>(opt);
}
else if (opt.Bits() == 32)
{
cout << "Bits 32/int histogram no longer supported. Using bits == 33 (float)." << endl;
b = EmberAnimate<float, float>(opt);
if (opt.Bits() == 33)
{
b = EmberAnimate<float, float>(opt);
}
else if (opt.Bits() == 32)
{
cout << "Bits 32/int histogram no longer supported. Using bits == 33 (float)." << endl;
b = EmberAnimate<float, float>(opt);
}
}
return b ? 0 : 1;
}
}

View File

@ -1,7 +1,7 @@
#include "EmberCLPch.h"
#include "DEOpenCLKernelCreator.h"
namespace EmberCLns
namespace EmberCLns
{
/// <summary>
/// Empty constructor that does nothing. The user must call the one which takes a bool
@ -219,7 +219,7 @@ template <typename T>
string DEOpenCLKernelCreator<T>::CreateLogScaleAssignDEKernelString()
{
ostringstream os;
os <<
ConstantDefinesString(typeid(T) == typeid(double)) <<
DensityFilterCLStructString <<
@ -243,7 +243,7 @@ string DEOpenCLKernelCreator<T>::CreateLogScaleAssignDEKernelString()
" barrier(CLK_GLOBAL_MEM_FENCE);\n"//Just to be safe. Makes no speed difference to do all of the time or only when there's a hit.
" }\n"
"}\n";
return os.str();
}
@ -354,7 +354,7 @@ string DEOpenCLKernelCreator<T>::CreateGaussianDEKernel(size_t ss)
" if (bucket.w != 0)\n"
" cacheLog = (densityFilter->m_K1 * log(1.0 + bucket.w * densityFilter->m_K2)) / bucket.w;\n"
"\n";
if (doSS)
{
os <<
@ -626,7 +626,7 @@ string DEOpenCLKernelCreator<T>::CreateGaussianDEKernel(size_t ss)
" if (bucket.w != 0)\n"
" {\n"
" cacheLog = (densityFilter->m_K1 * log(1.0 + bucket.w * densityFilter->m_K2)) / bucket.w;\n";
if (doSS)
{
os <<
@ -644,7 +644,7 @@ string DEOpenCLKernelCreator<T>::CreateGaussianDEKernel(size_t ss)
" }\n"
" }\n"
"\n";
if (doScf)
os << " filterSelect *= scfact;\n";
}
@ -653,7 +653,7 @@ string DEOpenCLKernelCreator<T>::CreateGaussianDEKernel(size_t ss)
os
<< " filterSelect = bucket.w;\n";
}
os <<
"\n"
" if (filterSelect > densityFilter->m_MaxFilteredCounts)\n"
@ -764,7 +764,7 @@ string DEOpenCLKernelCreator<T>::CreateGaussianDEKernelNoLocalCache(size_t ss)
" ((((BLOCK_ID_Y * chunkSizeH) + chunkH) * BLOCK_SIZE_Y) + THREAD_ID_Y >= densityFilter->m_SuperRasH))\n"
" return;\n"
"\n";
if (doSS)
{
os <<
@ -777,7 +777,7 @@ string DEOpenCLKernelCreator<T>::CreateGaussianDEKernelNoLocalCache(size_t ss)
if (doScf)
os << " real_t scfact = pow((real_t)densityFilter->m_Supersample / ((real_t)densityFilter->m_Supersample + 1.0), 2.0);\n";
}
os <<
//Compute the bounds of the area to be sampled, which is just the ends minus the super sample minus 1.
" uint leftBound = densityFilter->m_Supersample - 1;\n"
@ -807,7 +807,7 @@ string DEOpenCLKernelCreator<T>::CreateGaussianDEKernelNoLocalCache(size_t ss)
" if (bucket.w != 0)\n"
" {\n"
" cacheLog = (densityFilter->m_K1 * log(1.0 + bucket.w * densityFilter->m_K2)) / bucket.w;\n";
if (doSS)
{
os <<
@ -825,7 +825,7 @@ string DEOpenCLKernelCreator<T>::CreateGaussianDEKernelNoLocalCache(size_t ss)
" }\n"
" }\n"
"\n";
if (doScf)
os << " filterSelect *= scfact;\n";
}
@ -834,7 +834,7 @@ string DEOpenCLKernelCreator<T>::CreateGaussianDEKernelNoLocalCache(size_t ss)
os
<< " filterSelect = bucket.w;\n";
}
os <<
"\n"
" if (filterSelect > densityFilter->m_MaxFilteredCounts)\n"
@ -876,4 +876,10 @@ string DEOpenCLKernelCreator<T>::CreateGaussianDEKernelNoLocalCache(size_t ss)
return os.str();
}
}
template EMBERCL_API class DEOpenCLKernelCreator<float>;
#ifdef DO_DOUBLE
template EMBERCL_API class DEOpenCLKernelCreator<double>;
#endif
}

View File

@ -1,5 +1,5 @@
#pragma once
#include "EmberCLPch.h"
#include "EmberCLStructs.h"
#include "EmberCLFunctions.h"
@ -52,7 +52,7 @@ private:
string CreateLogScaleAssignDEKernelString();
string CreateGaussianDEKernel(size_t ss);
string CreateGaussianDEKernelNoLocalCache(size_t ss);
string m_LogScaleAssignDEKernel;
string m_LogScaleAssignDEEntryPoint;
@ -77,9 +77,9 @@ private:
bool m_NVidia;
};
template EMBERCL_API class DEOpenCLKernelCreator<float>;
#ifdef DO_DOUBLE
template EMBERCL_API class DEOpenCLKernelCreator<double>;
#endif
//template EMBERCL_API class DEOpenCLKernelCreator<float>;
//
//#ifdef DO_DOUBLE
// template EMBERCL_API class DEOpenCLKernelCreator<double>;
//#endif
}

View File

@ -8,9 +8,14 @@
#define WIN32_LEAN_AND_MEAN//Exclude rarely-used stuff from Windows headers.
#define _USE_MATH_DEFINES
#include "Timing.h"
#include "Renderer.h"
#ifdef _WIN32
#include <windows.h>
#include <SDKDDKVer.h>
#else
#include "GL/glx.h"
#endif
#include <utility>
@ -25,16 +30,17 @@
#include <iterator>
#include <time.h>
#include "Timing.h"
#include "Renderer.h"
#if defined(BUILDING_EMBERCL)
#define EMBERCL_API __declspec(dllexport)
#ifdef _WIN32
#if defined(BUILDING_EMBERCL)
#define EMBERCL_API __declspec(dllexport)
#else
#define EMBERCL_API __declspec(dllimport)
#endif
#else
#define EMBERCL_API __declspec(dllimport)
#define EMBERCL_API
#endif
using namespace std;
using namespace EmberNs;
//#define TEST_CL 1
//#define TEST_CL_BUFFERS 1
//#define TEST_CL_BUFFERS 1

View File

@ -13,7 +13,13 @@
namespace EmberCLns
{
#define ALIGN __declspec(align(16))//These two must always match.
//These two must always match.
#ifdef WIN32
#define ALIGN __declspec(align(16))
#else
#define ALIGN __attribute__ ((aligned (16)))
#endif
#define ALIGN_CL "((aligned (16)))"//The extra parens are necessary.
/// <summary>
@ -378,4 +384,4 @@ static const char* UnionCLStructString =
" real_t m_Reals[4];\n"
"} real4reals;\n"
"\n";
}
}

View File

@ -275,7 +275,7 @@ string FinalAccumOpenCLKernelCreator<T>::CreateFinalAccumKernelString(bool early
" finalColor.m_Float4.x = (float)newBucket.m_Real4.x;\n"//CPU side clamps, skip here because write_imagef() does the clamping for us.
" finalColor.m_Float4.y = (float)newBucket.m_Real4.y;\n"
" finalColor.m_Float4.z = (float)newBucket.m_Real4.z;\n";
if (alphaAccum)
{
if (alphaCalc)
@ -374,13 +374,13 @@ string FinalAccumOpenCLKernelCreator<T>::CreateGammaCorrectionFunctionString(boo
<< " else\n"
<< " a = 0;\n";
}
os <<
"\n"
" correctedChannels[rgbi] = (" << dataType << ")clamp(a, 0.0, 255.0);\n"
" }\n"
"\n";
//The CPU code has 3 cases for assigning alpha:
//[3] = alpha.//Early clip.
//[3] = alpha * 255.//Final Rgba with transparency.
@ -513,4 +513,10 @@ string FinalAccumOpenCLKernelCreator<T>::CreateGammaCorrectionKernelString(bool
return os.str();
}
}
template EMBERCL_API class FinalAccumOpenCLKernelCreator<float>;
#ifdef DO_DOUBLE
template EMBERCL_API class FinalAccumOpenCLKernelCreator<double>;
#endif
}

View File

@ -1,5 +1,5 @@
#pragma once
#include "EmberCLPch.h"
#include "EmberCLStructs.h"
#include "EmberCLFunctions.h"
@ -26,7 +26,7 @@ class EMBERCL_API FinalAccumOpenCLKernelCreator
{
public:
FinalAccumOpenCLKernelCreator();
string GammaCorrectionWithAlphaCalcKernel();
string GammaCorrectionWithAlphaCalcEntryPoint();
@ -79,9 +79,9 @@ private:
string m_FinalAccumLateClipWithoutAlphaCalcWithAlphaAccumEntryPoint;
};
template EMBERCL_API class FinalAccumOpenCLKernelCreator<float>;
#ifdef DO_DOUBLE
template EMBERCL_API class FinalAccumOpenCLKernelCreator<double>;
#endif
}
//template EMBERCL_API class FinalAccumOpenCLKernelCreator<float>;
//
//#ifdef DO_DOUBLE
// template EMBERCL_API class FinalAccumOpenCLKernelCreator<double>;
//#endif
}

View File

@ -60,7 +60,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(Ember<T>& ember, strin
for (i = 0; i < totalXformCount; i++)
{
Xform<T>* xform = ember.GetTotalXform(i);
size_t totalVarCount = xform->TotalVariationCount();
//size_t totalVarCount = xform->TotalVariationCount();
bool needPrecalcSumSquares = false;
bool needPrecalcSqrtSumSquares = false;
bool needPrecalcAngles = false;
@ -73,7 +73,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(Ember<T>& ember, strin
"{\n"
" real_t transX, transY, transZ;\n"
" real4 vIn, vOut = 0.0;\n";
//Determine if any variations, regular, pre, or post need precalcs.
while (Variation<T>* var = xform->GetVariation(v++))
{
@ -204,7 +204,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(Ember<T>& ember, strin
}
}
}
if (xform->HasPost())
{
xformFuncs <<
@ -267,7 +267,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(Ember<T>& ember, strin
" uint threadXDivRows = (THREAD_ID_X / (NTHREADS / THREADS_PER_WARP));\n"
" uint threadsMinus1 = NTHREADS - 1;\n"
;
os <<
"\n"
#ifndef STRAIGHT_RAND
@ -294,7 +294,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(Ember<T>& ember, strin
" firstPoint = points[pointsIndex];\n"
" }\n"
"\n";
//This is done once initially here and then again after each swap-sync in the main loop.
//This along with the randomness that the point shuffle provides gives sufficient randomness
//to produce results identical to those produced on the CPU.
@ -346,7 +346,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(Ember<T>& ember, strin
" switch (secondPoint.m_LastXfUsed)\n"
" {\n";
}
os <<
" case " << i << ":\n"
" {\n" <<
@ -430,7 +430,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(Ember<T>& ember, strin
" continue;\n"
" }\n"
"\n";
if (ember.UseFinalXform())
{
size_t finalIndex = ember.TotalXformCount() - 1;
@ -446,7 +446,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(Ember<T>& ember, strin
" }\n"
"\n";
}
os << CreateProjectionString(ember);
if (doAccum)
@ -549,7 +549,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(Ember<T>& ember, strin
"\n"
" barrier(CLK_GLOBAL_MEM_FENCE);\n";//Barrier every time, whether or not the point was in bounds, else artifacts will occur when doing strips.
}
os <<
" }\n"//Main for loop.
"\n"
@ -578,7 +578,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(Ember<T>& ember, strin
/// the length of the parametric values is unknown.
/// This is solved by passing a separate buffer of values dedicated specifically
/// to parametric variations.
/// In OpenCL, a series of #define constants are declared which specify the indices in
/// In OpenCL, a series of #define constants are declared which specify the indices in
/// the buffer where the various values are stored.
/// The possibility of a parametric variation type being present in multiple xforms is taken
/// into account by appending the xform index to the #define, thus making each unique.
@ -622,7 +622,7 @@ void IterOpenCLKernelCreator<T>::ParVarIndexDefines(Ember<T>& ember, pair<string
for (i = 0; i < xformCount; i++)
{
if (xform = ember.GetTotalXform(i))
if ((xform = ember.GetTotalXform(i)))
{
size_t varCount = xform->TotalVariationCount();
@ -672,7 +672,7 @@ template <typename T>
bool IterOpenCLKernelCreator<T>::IsBuildRequired(Ember<T>& ember1, Ember<T>& ember2)
{
size_t i, j, xformCount = ember1.TotalXformCount();
if (xformCount != ember2.TotalXformCount())
return true;
@ -834,4 +834,10 @@ string IterOpenCLKernelCreator<T>::CreateProjectionString(Ember<T>& ember)
return os.str();
}
}
template EMBERCL_API class IterOpenCLKernelCreator<float>;
#ifdef DO_DOUBLE
template EMBERCL_API class IterOpenCLKernelCreator<double>;
#endif
}

View File

@ -41,12 +41,12 @@ private:
string m_ZeroizeEntryPoint;
bool m_NVidia;
};
template EMBERCL_API class IterOpenCLKernelCreator<float>;
#ifdef DO_DOUBLE
template EMBERCL_API class IterOpenCLKernelCreator<double>;
#endif
//
//template EMBERCL_API class IterOpenCLKernelCreator<float>;
//
//#ifdef DO_DOUBLE
// template EMBERCL_API class IterOpenCLKernelCreator<double>;
//#endif
//
//template EMBERCL_API string IterOpenCLKernelCreator::CreateIterKernelString<float>(Ember<float>& ember, string& parVarDefines, bool lockAccum, bool doAccum);

View File

@ -48,13 +48,13 @@ bool OpenCLWrapper::Init(unsigned int platform, unsigned int device, bool shared
m_Init = false;
m_ErrorReport.clear();
if (m_Platforms.size() > 0)
{
if (platform < m_Platforms.size() && platform < m_Devices.size())
{
m_PlatformIndex = platform;//Platform is ok, now do context.
if (CreateContext(shared))
{
//Context is ok, now do device.
@ -90,10 +90,10 @@ bool OpenCLWrapper::Init(unsigned int platform, unsigned int device, bool shared
/// <param name="program">The program source</param>
/// <param name="entryPoint">The name of the entry point kernel function in the program</param>
/// <returns>True if success, else false.</returns>
bool OpenCLWrapper::AddProgram(std::string name, std::string& program, std::string& entryPoint, bool doublePrecision)
bool OpenCLWrapper::AddProgram(const string& name, const string& program, const string& entryPoint, bool doublePrecision)
{
Spk spk;
if (CreateSPK(name, program, entryPoint, spk, doublePrecision))
{
for (size_t i = 0; i < m_Programs.size(); i++)
@ -109,7 +109,7 @@ bool OpenCLWrapper::AddProgram(std::string name, std::string& program, std::stri
m_Programs.push_back(spk);
return true;
}
return false;
}
@ -135,14 +135,14 @@ void OpenCLWrapper::ClearPrograms()
bool OpenCLWrapper::AddBuffer(const string& name, size_t size, cl_mem_flags flags)
{
cl_int err;
if (m_Init)
{
int bufferIndex = FindBufferIndex(name);
if (bufferIndex == -1)//If the buffer didn't exist, create and add.
{
cl::Buffer buff(m_Context, flags, size, NULL, &err);
cl::Buffer buff(m_Context, flags, size, nullptr, &err);
if (!CheckCL(err, "cl::Buffer()"))
return false;
@ -153,9 +153,9 @@ bool OpenCLWrapper::AddBuffer(const string& name, size_t size, cl_mem_flags flag
}
else if (GetBufferSize(bufferIndex) != size)//If it did exist, only create and add if the sizes were different.
{
m_Buffers[bufferIndex] = NamedBuffer(cl::Buffer(m_Context, flags, 0, NULL, &err), "emptybuffer");//First clear out the original so the two don't exist in memory at once.
m_Buffers[bufferIndex] = NamedBuffer(cl::Buffer(m_Context, flags, 0, nullptr, &err), "emptybuffer");//First clear out the original so the two don't exist in memory at once.
cl::Buffer buff(m_Context, flags, size, NULL, &err);//Create the new buffer.
cl::Buffer buff(m_Context, flags, size, nullptr, &err);//Create the new buffer.
if (!CheckCL(err, "cl::Buffer()"))
return false;
@ -205,7 +205,7 @@ bool OpenCLWrapper::WriteBuffer(const string& name, void* data, size_t size)
{
int bufferIndex = FindBufferIndex(name);
return bufferIndex != -1 ? WriteBuffer(bufferIndex, data, size) : false;
return bufferIndex != -1 ? WriteBuffer(bufferIndex, data, size) : false;
}
/// <summary>
@ -220,7 +220,7 @@ bool OpenCLWrapper::WriteBuffer(unsigned int bufferIndex, void* data, size_t siz
if (m_Init && (bufferIndex < m_Buffers.size()) && (GetBufferSize(bufferIndex) == size))
{
cl::Event e;
cl_int err = m_Queue.enqueueWriteBuffer(m_Buffers[bufferIndex].m_Buffer, CL_TRUE, 0, size, data, NULL, &e);
cl_int err = m_Queue.enqueueWriteBuffer(m_Buffers[bufferIndex].m_Buffer, CL_TRUE, 0, size, data, nullptr, &e);
e.wait();
m_Queue.finish();
@ -243,7 +243,7 @@ bool OpenCLWrapper::ReadBuffer(const string& name, void* data, size_t size)
{
int bufferIndex = FindBufferIndex(name);
return bufferIndex != -1 ? ReadBuffer(bufferIndex, data, size) : false;
return bufferIndex != -1 ? ReadBuffer(bufferIndex, data, size) : false;
}
/// <summary>
@ -258,7 +258,7 @@ bool OpenCLWrapper::ReadBuffer(unsigned int bufferIndex, void* data, size_t size
if (m_Init && (bufferIndex < m_Buffers.size()) && (GetBufferSize(bufferIndex) == size))
{
cl::Event e;
cl_int err = m_Queue.enqueueReadBuffer(m_Buffers[bufferIndex].m_Buffer, CL_TRUE, 0, size, data, NULL, &e);
cl_int err = m_Queue.enqueueReadBuffer(m_Buffers[bufferIndex].m_Buffer, CL_TRUE, 0, size, data, nullptr, &e);
e.wait();
m_Queue.finish();
@ -291,9 +291,9 @@ int OpenCLWrapper::FindBufferIndex(const string& name)
/// <returns>The size of the buffer if found, else 0.</returns>
unsigned int OpenCLWrapper::GetBufferSize(const string& name)
{
unsigned int bufferIndex = FindBufferIndex(name);
int bufferIndex = FindBufferIndex(name);
return bufferIndex != -1 ? GetBufferSize(bufferIndex) : 0;
return bufferIndex != -1 ? GetBufferSize(bufferIndex) : 0;
}
/// <summary>
@ -304,7 +304,7 @@ unsigned int OpenCLWrapper::GetBufferSize(const string& name)
unsigned int OpenCLWrapper::GetBufferSize(unsigned int bufferIndex)
{
if (m_Init && bufferIndex < m_Buffers.size())
return (unsigned int)m_Buffers[bufferIndex].m_Buffer.getInfo<CL_MEM_SIZE>();
return (unsigned int)m_Buffers[bufferIndex].m_Buffer.getInfo<CL_MEM_SIZE>(nullptr);
return 0;
}
@ -437,7 +437,7 @@ bool OpenCLWrapper::WriteImage2D(unsigned int index, bool shared, ::size_t width
cl_int err;
cl::Event e;
cl::size_t<3> origin, region;
origin[0] = 0;
origin[1] = 0;
origin[2] = 0;
@ -452,7 +452,7 @@ bool OpenCLWrapper::WriteImage2D(unsigned int index, bool shared, ::size_t width
if (EnqueueAcquireGLObjects(imageGL))
{
err = m_Queue.enqueueWriteImage(imageGL, CL_TRUE, origin, region, row_pitch, 0, data, NULL, &e);
err = m_Queue.enqueueWriteImage(imageGL, CL_TRUE, origin, region, row_pitch, 0, data, nullptr, &e);
e.wait();
m_Queue.finish();
@ -462,7 +462,7 @@ bool OpenCLWrapper::WriteImage2D(unsigned int index, bool shared, ::size_t width
}
else if (!shared && index < m_Images.size())
{
err = m_Queue.enqueueWriteImage(m_Images[index].m_Image, CL_TRUE, origin, region, row_pitch, 0, data, NULL, &e);
err = m_Queue.enqueueWriteImage(m_Images[index].m_Image, CL_TRUE, origin, region, row_pitch, 0, data, nullptr, &e);
e.wait();
m_Queue.finish();
return CheckCL(err, "cl::enqueueWriteImage()");
@ -512,7 +512,7 @@ bool OpenCLWrapper::ReadImage(unsigned int imageIndex, ::size_t width, ::size_t
cl_int err;
cl::Event e;
cl::size_t<3> origin, region;
origin[0] = 0;
origin[1] = 0;
origin[2] = 0;
@ -595,16 +595,16 @@ unsigned int OpenCLWrapper::GetImageSize(unsigned int imageIndex, bool shared)
vector<cl::Memory> images;
images.push_back(m_GLImages[imageIndex].m_Image);
IMAGEGL2D image = m_GLImages[imageIndex].m_Image;
if (EnqueueAcquireGLObjects(&images))
size = image.getImageInfo<CL_IMAGE_WIDTH>() * image.getImageInfo<CL_IMAGE_HEIGHT>() * image.getImageInfo<CL_IMAGE_ELEMENT_SIZE>();//Should pitch be checked here?
size = image.getImageInfo<CL_IMAGE_WIDTH>(nullptr) * image.getImageInfo<CL_IMAGE_HEIGHT>(nullptr) * image.getImageInfo<CL_IMAGE_ELEMENT_SIZE>(nullptr);//Should pitch be checked here?
EnqueueReleaseGLObjects(&images);
}
else if (!shared && imageIndex < m_Images.size())
{
cl::Image2D image = m_Images[imageIndex].m_Image;
size = image.getImageInfo<CL_IMAGE_WIDTH>() * image.getImageInfo<CL_IMAGE_HEIGHT>() * image.getImageInfo<CL_IMAGE_ELEMENT_SIZE>();//Should pitch be checked here?
size = image.getImageInfo<CL_IMAGE_WIDTH>(nullptr) * image.getImageInfo<CL_IMAGE_HEIGHT>(nullptr) * image.getImageInfo<CL_IMAGE_ELEMENT_SIZE>(nullptr);//Should pitch be checked here?
}
}
@ -623,13 +623,13 @@ unsigned int OpenCLWrapper::GetImageSize(unsigned int imageIndex, bool shared)
/// <returns>True if all parameters matched, else false.</returns>
bool OpenCLWrapper::CompareImageParams(cl::Image& image, cl_mem_flags flags, const cl::ImageFormat& format, ::size_t width, ::size_t height, ::size_t row_pitch)
{
cl_image_format tempFormat = image.getImageInfo<CL_IMAGE_FORMAT>();
cl_image_format tempFormat = image.getImageInfo<CL_IMAGE_FORMAT>(nullptr);
return (/*image.getImageInfo<CL_MEM_FLAGS>() == flags &&*/
tempFormat.image_channel_data_type == format.image_channel_data_type &&
tempFormat.image_channel_order == format.image_channel_order &&
image.getImageInfo<CL_IMAGE_WIDTH>() == width &&
image.getImageInfo<CL_IMAGE_HEIGHT>() == height/* &&
tempFormat.image_channel_data_type == format.image_channel_data_type &&
tempFormat.image_channel_order == format.image_channel_order &&
image.getImageInfo<CL_IMAGE_WIDTH>(nullptr) == width &&
image.getImageInfo<CL_IMAGE_HEIGHT>(nullptr) == height/* &&
image.getImageInfo<CL_IMAGE_ROW_PITCH>() == row_pitch*/);//Pitch will be (width * bytes per pixel) + padding.
}
@ -822,7 +822,7 @@ bool OpenCLWrapper::EnqueueReleaseGLObjects(const VECTOR_CLASS<cl::Memory>* memO
bool OpenCLWrapper::CreateSampler(cl::Sampler& sampler, cl_bool normalizedCoords, cl_addressing_mode addressingMode, cl_filter_mode filterMode)
{
cl_int err;
sampler = cl::Sampler(m_Context,
normalizedCoords,
addressingMode,
@ -840,7 +840,7 @@ bool OpenCLWrapper::CreateSampler(cl::Sampler& sampler, cl_bool normalizedCoords
/// <param name="argIndex">Index of the argument</param>
/// <param name="name">The name of the buffer</param>
/// <returns>True if success, else false.</returns>
bool OpenCLWrapper::SetBufferArg(unsigned int kernelIndex, unsigned int argIndex, string name)
bool OpenCLWrapper::SetBufferArg(unsigned int kernelIndex, unsigned int argIndex, const string& name)
{
int bufferIndex = OpenCLWrapper::FindBufferIndex(name);
@ -872,7 +872,7 @@ bool OpenCLWrapper::SetBufferArg(unsigned int kernelIndex, unsigned int argIndex
/// <param name="shared">True if shared with an OpenGL texture, else false</param>
/// <param name="name">The name of the 2D image</param>
/// <returns>True if success, else false.</returns>
bool OpenCLWrapper::SetImageArg(unsigned int kernelIndex, unsigned int argIndex, bool shared, string name)
bool OpenCLWrapper::SetImageArg(unsigned int kernelIndex, unsigned int argIndex, bool shared, const string& name)
{
if (m_Init)
{
@ -948,7 +948,7 @@ bool OpenCLWrapper::RunKernel(unsigned int kernelIndex, unsigned int totalGridWi
cl::NullRange,
cl::NDRange(totalGridWidth, totalGridHeight, totalGridDepth),
cl::NDRange(blockWidth, blockHeight, blockDepth),
NULL,
nullptr,
&e);
e.wait();
@ -984,7 +984,7 @@ T OpenCLWrapper::GetInfo(size_t platform, size_t device, cl_device_info name)
string OpenCLWrapper::PlatformName(size_t platform)
{
if (platform < m_Platforms.size())
return m_Platforms[platform].getInfo<CL_PLATFORM_VENDOR>() + " " + m_Platforms[platform].getInfo<CL_PLATFORM_NAME>() + " " + m_Platforms[platform].getInfo<CL_PLATFORM_VERSION>();
return m_Platforms[platform].getInfo<CL_PLATFORM_VENDOR>(nullptr) + " " + m_Platforms[platform].getInfo<CL_PLATFORM_NAME>(nullptr) + " " + m_Platforms[platform].getInfo<CL_PLATFORM_VERSION>(nullptr);
else
return "";
}
@ -1018,7 +1018,7 @@ string OpenCLWrapper::DeviceName(size_t platform, size_t device)
if (platform < m_Platforms.size() && platform < m_Devices.size())
if (device < m_Devices[platform].size())
s = m_Devices[platform][device].getInfo<CL_DEVICE_VENDOR>() + " " + m_Devices[platform][device].getInfo<CL_DEVICE_NAME>();// + " " + m_Devices[platform][device].getInfo<CL_DEVICE_VERSION>();
s = m_Devices[platform][device].getInfo<CL_DEVICE_VENDOR>(nullptr) + " " + m_Devices[platform][device].getInfo<CL_DEVICE_NAME>(nullptr);// + " " + m_Devices[platform][device].getInfo<CL_DEVICE_VERSION>();
return s;
}
@ -1043,7 +1043,7 @@ vector<string> OpenCLWrapper::DeviceNames(size_t platform)
i++;
} while (s != "");
return devices;
}
@ -1094,13 +1094,13 @@ string OpenCLWrapper::DumpInfo()
os << "CL_DEVICE_MAX_READ_IMAGE_ARGS: " << GetInfo<cl_uint> (platform, device, CL_DEVICE_MAX_READ_IMAGE_ARGS) << endl;
os << "CL_DEVICE_MAX_WRITE_IMAGE_ARGS: " << GetInfo<cl_uint> (platform, device, CL_DEVICE_MAX_WRITE_IMAGE_ARGS) << endl;
os << "CL_DEVICE_MAX_MEM_ALLOC_SIZE: " << GetInfo<cl_ulong>(platform, device, CL_DEVICE_MAX_MEM_ALLOC_SIZE) << endl;
os << "CL_DEVICE_GLOBAL_MEM_CACHE_TYPE: " << GetInfo<cl_uint> (platform, device, CL_DEVICE_GLOBAL_MEM_CACHE_TYPE) << endl;
os << "CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: " << GetInfo<cl_uint> (platform, device, CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE) << endl;
os << "CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: " << GetInfo<cl_ulong>(platform, device, CL_DEVICE_GLOBAL_MEM_CACHE_SIZE) << endl;
os << "CL_DEVICE_GLOBAL_MEM_SIZE: " << GetInfo<cl_ulong>(platform, device, CL_DEVICE_GLOBAL_MEM_SIZE) << endl;
os << "CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: " << GetInfo<cl_ulong>(platform, device, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE) << endl;
os << "CL_DEVICE_MAX_CONSTANT_ARGS: " << GetInfo<cl_uint> (platform, device, CL_DEVICE_MAX_CONSTANT_ARGS) << endl;
os << "CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: " << GetInfo<cl_uint> (platform, device, CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS) << endl;
os << "CL_DEVICE_MAX_WORK_GROUP_SIZE: " << GetInfo<::size_t>(platform, device, CL_DEVICE_MAX_WORK_GROUP_SIZE) << endl;
@ -1165,7 +1165,7 @@ bool OpenCLWrapper::CreateContext(bool shared)
0
};
m_Context = cl::Context(CL_DEVICE_TYPE_GPU, props, NULL, NULL, &err);//May need to tinker with this on Mac.
m_Context = cl::Context(CL_DEVICE_TYPE_GPU, props, nullptr, nullptr, &err);//May need to tinker with this on Mac.
#else
#if defined WIN32
cl_context_properties props[] =
@ -1175,18 +1175,18 @@ bool OpenCLWrapper::CreateContext(bool shared)
CL_CONTEXT_PLATFORM, (cl_context_properties)(m_Platforms[m_PlatformIndex])(),
0
};
m_Context = cl::Context(CL_DEVICE_TYPE_GPU, props, NULL, NULL, &err);
m_Context = cl::Context(CL_DEVICE_TYPE_GPU, props, nullptr, nullptr, &err);
#else
cl_context_properties props[] =
{
CL_GL_CONTEXT_KHR, (cl_context_properties)glXGetCurrentContext(),
CL_GLX_DISPLAY_KHR, (cl_context_properties)glXGetCurrentDisplay(),
CL_CONTEXT_PLATFORM, (cl_context_properties)(m_Platforms[m_Platform])(),
CL_CONTEXT_PLATFORM, (cl_context_properties)(m_Platforms[m_PlatformIndex])(),
0
};
m_Context = cl::Context(CL_DEVICE_TYPE_GPU, props, NULL, NULL, &err);
m_Context = cl::Context(CL_DEVICE_TYPE_GPU, props, nullptr, nullptr, &err);
#endif
#endif
}
@ -1199,7 +1199,7 @@ bool OpenCLWrapper::CreateContext(bool shared)
0
};
m_Context = cl::Context(CL_DEVICE_TYPE_ALL, props, NULL, NULL, &err);
m_Context = cl::Context(CL_DEVICE_TYPE_ALL, props, nullptr, nullptr, &err);
}
return CheckCL(err, "cl::Context()");
@ -1213,7 +1213,7 @@ bool OpenCLWrapper::CreateContext(bool shared)
/// <param name="entryPoint">The name of the entry point kernel function in the program</param>
/// <param name="spk">The Spk object to store the resulting compiled program in</param>
/// <returns>True if success, else false.</returns>
bool OpenCLWrapper::CreateSPK(std::string& name, std::string& program, std::string& entryPoint, Spk& spk, bool doublePrecision)
bool OpenCLWrapper::CreateSPK(const string& name, const string& program, const string& entryPoint, Spk& spk, bool doublePrecision)
{
if (m_Init)
{
@ -1231,12 +1231,12 @@ bool OpenCLWrapper::CreateSPK(std::string& name, std::string& program, std::stri
//err = spk.m_Program.build(m_DeviceVec, "-cl-mad-enable -cl-single-precision-constant");
//err = spk.m_Program.build(m_DeviceVec, "-cl-mad-enable -cl-no-signed-zeros -cl-fast-relaxed-math -cl-single-precision-constant");//This can cause some rounding.
//err = spk.m_Program.build(m_DeviceVec, "-cl-mad-enable -cl-single-precision-constant");
if (CheckCL(err, "cl::Program::build()"))
{
//Building of program is ok, now create kernel with the specified entry point.
spk.m_Kernel = cl::Kernel(spk.m_Program, entryPoint.c_str(), &err);
if (CheckCL(err, "cl::Kernel()"))
return true;//Everything is ok.
}
@ -1330,4 +1330,4 @@ std::string OpenCLWrapper::ErrorToStringCL(cl_int err)
}
}
}
}
}

View File

@ -37,7 +37,7 @@ public:
{
}
NamedBuffer(cl::Buffer& buff, string name)
NamedBuffer(const cl::Buffer& buff, const string& name)
{
m_Buffer = buff;
m_Name = name;
@ -57,7 +57,7 @@ public:
{
}
NamedImage2D(cl::Image2D& image, string name)
NamedImage2D(const cl::Image2D& image, const string& name)
{
m_Image = image;
m_Name = name;
@ -78,7 +78,7 @@ public:
{
}
NamedImage2DGL(IMAGEGL2D& image, string name)
NamedImage2DGL(const IMAGEGL2D& image, const string& name)
{
m_Image = image;
m_Name = name;
@ -107,7 +107,7 @@ public:
bool Init(unsigned int platform, unsigned int device, bool shared = false);
//Programs.
bool AddProgram(std::string name, std::string& program, std::string& entryPoint, bool doublePrecision);
bool AddProgram(const string& name, const string& program, const string& entryPoint, bool doublePrecision);
void ClearPrograms();
//Buffers.
@ -141,13 +141,13 @@ public:
bool EnqueueAcquireGLObjects(const VECTOR_CLASS<cl::Memory>* memObjects = NULL);
bool EnqueueReleaseGLObjects(const VECTOR_CLASS<cl::Memory>* memObjects = NULL);
bool CreateSampler(cl::Sampler& sampler, cl_bool normalizedCoords, cl_addressing_mode addressingMode, cl_filter_mode filterMode);
//Arguments.
bool SetBufferArg(unsigned int kernelIndex, unsigned int argIndex, string name);
bool SetBufferArg(unsigned int kernelIndex, unsigned int argIndex, const string& name);
bool SetBufferArg(unsigned int kernelIndex, unsigned int argIndex, unsigned int bufferIndex);
bool SetImageArg(unsigned int kernelIndex, unsigned int argIndex, bool shared, string name);
bool SetImageArg(unsigned int kernelIndex, unsigned int argIndex, bool shared, const string& name);
bool SetImageArg(unsigned int kernelIndex, unsigned int argIndex, bool shared, unsigned int imageIndex);
/// <summary>
/// Set an argument in the specified kernel, at the specified argument index.
/// Must keep this here in the .h because it's templated.
@ -195,7 +195,7 @@ public:
private:
bool CreateContext(bool shared);
bool CreateSPK(std::string& name, std::string& program, std::string& entryPoint, Spk& spk, bool doublePrecision);
bool CreateSPK(const string& name, const string& program, const string& entryPoint, Spk& spk, bool doublePrecision);
bool CheckCL(cl_int err, const char* name);
std::string ErrorToStringCL(cl_int err);
@ -216,4 +216,4 @@ private:
std::vector<NamedImage2D> m_Images;
std::vector<NamedImage2DGL> m_GLImages;
};
}
}

View File

@ -52,7 +52,7 @@ RendererCL<T>::RendererCL(unsigned int platform, unsigned int device, bool share
m_PaletteFormat.image_channel_data_type = CL_FLOAT;
m_FinalFormat.image_channel_order = CL_RGBA;
m_FinalFormat.image_channel_data_type = CL_UNORM_INT8;//Change if this ever supports 2BPC outputs for PNG.
FillSeeds();
Init(platform, device, shared, outputTexID);//Init OpenCL upon construction and create programs that will not change.
}
@ -73,7 +73,7 @@ RendererCL<T>::~RendererCL()
/// Initialize OpenCL.
/// In addition to initializing, this function will create the zeroization program,
/// as well as the basic log scale filtering programs. This is done to ensure basic
/// compilation works. Further compilation will be done later for iteration, density filtering,
/// compilation works. Further compilation will be done later for iteration, density filtering,
/// and final accumulation.
/// </summary>
/// <param name="platform">The index platform of the platform to use</param>
@ -146,7 +146,7 @@ bool RendererCL<T>::SetOutputTexture(GLuint outputTexID)
m_ErrorReport.push_back(loc);
success = false;
}
LeaveResize();
return success;
}
@ -312,7 +312,7 @@ bool RendererCL<T>::ClearFinal()
vector<unsigned char> v;
unsigned int index = m_Wrapper.FindImageIndex(m_FinalImageName, m_Wrapper.Shared());
if (PrepFinalAccumVector(v))
if (this->PrepFinalAccumVector(v))
{
bool b = m_Wrapper.WriteImage2D(index, m_Wrapper.Shared(), FinalRasW(), FinalRasH(), 0, v.data());
@ -472,7 +472,7 @@ eRendererType RendererCL<T>::RendererType() const
/// </summary>
/// <returns>The concatenated error report string</returns>
template <typename T>
string RendererCL<T>::ErrorReportString()
string RendererCL<T>::ErrorReportString()
{
return EmberReport::ErrorReportString() + m_Wrapper.ErrorReportString();
}
@ -527,9 +527,11 @@ bool RendererCL<T>::RandVec(vector<QTIsaac<ISAAC_SIZE, ISAAC_INT>>& randVec)
template <typename T>
void RendererCL<T>::MakeDmap(T colorScalar)
{
m_Ember.m_Palette.MakeDmap<float>(m_Dmap, colorScalar);
//m_Ember.m_Palette.MakeDmap<float>(m_DmapCL, colorScalar);
m_Ember.m_Palette.MakeDmap(m_DmapCL, colorScalar);
}
/// <summary>
/// Allocate all buffers required for running as well as the final
/// 2D image.
@ -561,9 +563,10 @@ bool RendererCL<T>::Alloc()
if (b && !(b = m_Wrapper.AddBuffer(m_AccumBufferName, accumLength))) { m_ErrorReport.push_back(loc); }//Accum buffer.
if (b && !(b = m_Wrapper.AddBuffer(m_PointsBufferName, IterGridKernelCount() * sizeof(PointCL<T>)))) { m_ErrorReport.push_back(loc); }//Points between iter calls.
LeaveResize();
if (b && !(b = SetOutputTexture(m_OutputTexID))) { m_ErrorReport.push_back(loc); }
LeaveResize();
return b;
}
@ -706,7 +709,7 @@ EmberStats RendererCL<T>::Iterate(size_t iterCount, size_t temporalSample)
else
{
m_Abort = true;
m_ErrorReport.push_back(loc);
m_ErrorReport.push_back(loc);
}
return stats;
@ -787,9 +790,9 @@ bool RendererCL<T>::RunIter(size_t iterCount, size_t temporalSample, size_t& ite
if (b && !(b = m_Wrapper.WriteBuffer (m_XformsBufferName, (void*)m_XformsCL.data(), sizeof(m_XformsCL[0]) * m_XformsCL.size()))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DistBufferName, (void*)XformDistributions(), XformDistributionsSize()))) { m_ErrorReport.push_back(loc); }//Will be resized for xaos.
if (b && !(b = m_Wrapper.WriteBuffer (m_CarToRasBufferName, (void*)&m_CarToRasCL, sizeof(m_CarToRasCL)))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteImage("Palette", CL_MEM_READ_ONLY, m_PaletteFormat, m_Dmap.m_Entries.size(), 1, 0, m_Dmap.m_Entries.data()))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.AddAndWriteImage("Palette", CL_MEM_READ_ONLY, m_PaletteFormat, m_DmapCL.m_Entries.size(), 1, 0, m_DmapCL.m_Entries.data()))) { m_ErrorReport.push_back(loc); }
//If animating, treat each temporal sample as a newly started render for fusing purposes.
if (temporalSample > 0)
m_Calls = 0;
@ -830,7 +833,7 @@ bool RendererCL<T>::RunIter(size_t iterCount, size_t temporalSample, size_t& ite
if (b && !(b = m_Wrapper.SetArg (kernelIndex, argIndex++, supersize))) { m_ErrorReport.push_back(loc); }//Histogram size.
if (b && !(b = m_Wrapper.SetImageArg (kernelIndex, argIndex++, false, "Palette"))) { m_ErrorReport.push_back(loc); }//Palette.
if (b && !(b = m_Wrapper.SetBufferArg(kernelIndex, argIndex++, m_PointsBufferName))) { m_ErrorReport.push_back(loc); }//Random start points.
if (b && !(b = m_Wrapper.RunKernel(kernelIndex,
gridW * IterBlockKernelWidth(),//Total grid dims.
gridH * IterBlockKernelHeight(),
@ -840,10 +843,10 @@ bool RendererCL<T>::RunIter(size_t iterCount, size_t temporalSample, size_t& ite
1)))
{
m_Abort = true;
m_ErrorReport.push_back(loc);
m_ErrorReport.push_back(loc);
break;
}
itersRan += iterCountThisLaunch;
m_Calls++;
@ -863,14 +866,14 @@ bool RendererCL<T>::RunIter(size_t iterCount, size_t temporalSample, size_t& ite
double percentDiff = percent - m_LastIterPercent;
double toc = m_ProgressTimer.Toc();
if (percentDiff >= 10 || (toc > 1000 && percentDiff >= 1))//Call callback function if either 10% has passed, or one second (and 1%).
{
etaMs = ((100.0 - percent) / percent) * m_RenderTimer.Toc();
if (!m_Callback->ProgressFunc(m_Ember, m_ProgressParameter, percent, 0, etaMs))
Abort();
m_LastIterPercent = percent;
m_ProgressTimer.Tic();
}
@ -901,7 +904,7 @@ eRenderStatus RendererCL<T>::RunLogScaleFilter()
eRenderStatus status = RENDER_OK;
if (kernelIndex != -1)
{
{
m_DensityFilterCL = ConvertDensityFilter();
unsigned int argIndex = 0;
unsigned int blockW = m_WarpSize;
@ -910,7 +913,7 @@ eRenderStatus RendererCL<T>::RunLogScaleFilter()
unsigned int gridH = m_DensityFilterCL.m_SuperRasH;
OpenCLWrapper::MakeEvenGridDims(blockW, blockH, gridW, gridH);
if (b && !(b = m_Wrapper.AddAndWriteBuffer(m_DEFilterParamsBufferName, (void*)&m_DensityFilterCL, sizeof(m_DensityFilterCL)))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.SetBufferArg(kernelIndex, argIndex++, m_HistBufferName))) { m_ErrorReport.push_back(loc); }//Histogram.
@ -926,7 +929,7 @@ eRenderStatus RendererCL<T>::RunLogScaleFilter()
b = false;
m_ErrorReport.push_back(loc);
}
if (b && m_Callback)
m_Callback->ProgressFunc(m_Ember, m_ProgressParameter, 100.0, 1, 0.0);
@ -1030,7 +1033,7 @@ eRenderStatus RendererCL<T>::RunDensityFilter()
{
double percent = (double((rowChunk * chunkSizeW) + (colChunk + 1)) / totalChunks) * 100.0;
double etaMs = ((100.0 - percent) / percent) * t.Toc();
if (!m_Callback->ProgressFunc(m_Ember, m_ProgressParameter, percent, 1, etaMs))
Abort();
}
@ -1040,7 +1043,7 @@ eRenderStatus RendererCL<T>::RunDensityFilter()
if (b && m_Callback)
m_Callback->ProgressFunc(m_Ember, m_ProgressParameter, 100.0, 1, 0.0);
//t2.Toc(__FUNCTION__ " all passes");
}
else
@ -1048,10 +1051,10 @@ eRenderStatus RendererCL<T>::RunDensityFilter()
b = false;
m_ErrorReport.push_back(loc);
}
return m_Abort ? RENDER_ABORT : (b ? RENDER_OK : RENDER_ERROR);
}
/// <summary>
/// Run final accumulation to the 2D output image.
/// </summary>
@ -1096,13 +1099,13 @@ eRenderStatus RendererCL<T>::RunFinalAccum()
if (b && !(b = m_Wrapper.SetBufferArg(gammaCorrectKernelIndex, argIndex++, m_AccumBufferName))) { m_ErrorReport.push_back(loc); }//Accumulator.
if (b && !(b = m_Wrapper.SetBufferArg(gammaCorrectKernelIndex, argIndex++, m_SpatialFilterParamsBufferName))) { m_ErrorReport.push_back(loc); }//SpatialFilterCL.
if (b && !(b = m_Wrapper.RunKernel(gammaCorrectKernelIndex, gridW, gridH, 1, blockW, blockH, 1))) { m_ErrorReport.push_back(loc); }
}
else
{
b = false;
m_ErrorReport.push_back(loc);
m_ErrorReport.push_back(loc);
}
}
@ -1122,9 +1125,9 @@ eRenderStatus RendererCL<T>::RunFinalAccum()
if (b && m_Wrapper.Shared())
if (b && !(b = m_Wrapper.EnqueueAcquireGLObjects(m_FinalImageName))) { m_ErrorReport.push_back(loc); }
if (b && !(b = m_Wrapper.RunKernel(accumKernelIndex, gridW, gridH, 1, blockW, blockH, 1))) { m_ErrorReport.push_back(loc); }
if (b && m_Wrapper.Shared())
if (b && !(b = m_Wrapper.EnqueueReleaseGLObjects(m_FinalImageName))) { m_ErrorReport.push_back(loc); }
@ -1135,7 +1138,7 @@ eRenderStatus RendererCL<T>::RunFinalAccum()
b = false;
m_ErrorReport.push_back(loc);
}
return b ? RENDER_OK : RENDER_ERROR;
}
@ -1350,7 +1353,7 @@ SpatialFilterCL<T> RendererCL<T>::ConvertSpatialFilter()
Color<T> background;
SpatialFilterCL<T> filterCL;
PrepFinalAccumVals(background, g, linRange, vibrancy);
this->PrepFinalAccumVals(background, g, linRange, vibrancy);
filterCL.m_SuperRasW = (unsigned int)SuperRasW();
filterCL.m_SuperRasH = (unsigned int)SuperRasH();
@ -1368,7 +1371,7 @@ SpatialFilterCL<T> RendererCL<T>::ConvertSpatialFilter()
filterCL.m_Gamma = g;
filterCL.m_LinRange = linRange;
filterCL.m_Background = background;
return filterCL;
}
@ -1467,4 +1470,10 @@ void RendererCL<T>::FillSeeds()
m_Seeds[i].y = m_Rand[0].Rand();
}
}
}
template EMBERCL_API class RendererCL<float>;
#ifdef DO_DOUBLE
template EMBERCL_API class RendererCL<double>;
#endif
}

View File

@ -18,6 +18,7 @@ namespace EmberCLns
class EMBERCL_API RendererCLBase
{
public:
virtual ~RendererCLBase() { }
virtual bool ReadFinal(unsigned char* pixels) = 0;
virtual bool ClearFinal() = 0;
};
@ -33,8 +34,25 @@ public:
/// and uses both for the base.
/// </summary>
template <typename T>
class EMBERCL_API RendererCL : public RendererCLBase, public Renderer<T, T>
class EMBERCL_API RendererCL : public Renderer<T, T>, public RendererCLBase
{
using EmberNs::Renderer<T, T>::RendererBase::EmberReport::m_ErrorReport;
using EmberNs::Renderer<T, T>::RendererBase::m_ProgressParameter;
using EmberNs::Renderer<T, T>::RendererBase::m_YAxisUp;
using EmberNs::Renderer<T, T>::RendererBase::m_LockAccum;
using EmberNs::Renderer<T, T>::RendererBase::m_Abort;
using EmberNs::Renderer<T, T>::RendererBase::m_NumChannels;
using EmberNs::Renderer<T, T>::RendererBase::m_LastIter;
using EmberNs::Renderer<T, T>::RendererBase::m_LastIterPercent;
using EmberNs::Renderer<T, T>::RendererBase::m_Stats;
using EmberNs::Renderer<T, T>::RendererBase::m_Callback;
using EmberNs::Renderer<T, T>::RendererBase::m_Rand;
using EmberNs::Renderer<T, T>::RendererBase::m_RenderTimer;
using EmberNs::Renderer<T, T>::RendererBase::m_IterTimer;
using EmberNs::Renderer<T, T>::RendererBase::m_ProgressTimer;
using EmberNs::Renderer<T, T>::m_RotMat;
using EmberNs::Renderer<T, T>::m_Ember;
public:
RendererCL(unsigned int platform = 0, unsigned int device = 0, bool shared = false, GLuint outputTexID = 0);
~RendererCL();
@ -158,7 +176,7 @@ private:
//Kernels.
string m_IterKernel;
OpenCLWrapper m_Wrapper;
cl::ImageFormat m_PaletteFormat;
cl::ImageFormat m_FinalFormat;
@ -168,7 +186,7 @@ private:
EmberCL<T> m_EmberCL;
vector<XformCL<T>> m_XformsCL;
vector<glm::highp_uvec2> m_Seeds;
Palette<float> m_Dmap;//Used instead of the base class' m_Dmap because OpenCL only supports float textures.
Palette<float> m_DmapCL;//Used instead of the base class' m_Dmap because OpenCL only supports float textures.
CarToRasCL<T> m_CarToRasCL;
DensityFilterCL<T> m_DensityFilterCL;
SpatialFilterCL<T> m_SpatialFilterCL;
@ -179,9 +197,9 @@ private:
Ember<T> m_LastBuiltEmber;
};
template EMBERCL_API class RendererCL<float>;
#ifdef DO_DOUBLE
template EMBERCL_API class RendererCL<double>;
#endif
}
//template EMBERCL_API class RendererCL<float>;
//
//#ifdef DO_DOUBLE
// template EMBERCL_API class RendererCL<double>;
//#endif
}

View File

@ -12,13 +12,18 @@
#include <SDKDDKVer.h>
#include <windows.h>
#include <winsock.h>//For htons().
#include <BaseTsd.h>
#include <crtdbg.h>
#include <tchar.h>
#define snprintf _snprintf
#else
#include <arpa/inet.h>
#define _TCHAR char
#define _tmain main
#define _T
#define fprintf_s fprintf
#endif
#include <BaseTsd.h>
#include <crtdbg.h>
#include <iostream>
#include <iomanip>
#include <ostream>
@ -27,11 +32,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tchar.h>
#include "jconfig.h"
#include "jpeglib.h"
#define PNG_SKIP_SETJMP_CHECK 1
#include "png.h"
//#include "pnginfo.h"

View File

@ -6,7 +6,7 @@
/// EmberOptionEntry and EmberOptions classes.
/// </summary>
static char* DescriptionString = "Ember - Fractal flames C++ port and enhancement with OpenCL GPU support";
static const char* DescriptionString = "Ember - Fractal flames C++ port and enhancement with OpenCL GPU support";
/// <summary>
/// Enum for specifying which command line programs an option is meant to be used with.
@ -142,7 +142,7 @@ private:
m_OptionUse = OPT_USE_ALL;
m_Option.nArgType = SO_NONE;
m_Option.nId = 0;
m_Option.pszArg = _T("--fillmein");
m_Option.pszArg = _T("--fillmein");
m_DocString = "Dummy doc";
}
@ -175,7 +175,7 @@ public:
{
*this = entry;
}
/// <summary>
/// Functor accessors.
/// </summary>
@ -277,7 +277,7 @@ public:
INITBOOLOPTION(DoProgress, Eob(OPT_USE_ALL, OPT_PROGRESS, _T("--progress"), false, SO_NONE, "\t--progress Display progress. This will slow down processing by about 10%%.\n"));
INITBOOLOPTION(OpenCLInfo, Eob(OPT_USE_ALL, OPT_DUMP_OPENCL_INFO, _T("--openclinfo"), false, SO_NONE, "\t--openclinfo Display platforms and devices for OpenCL.\n"));
//Execution bools.
//Execution bools.
INITBOOLOPTION(EmberCL, Eob(OPT_USE_ALL, OPT_OPENCL, _T("--opencl"), false, SO_NONE, "\t--opencl Use OpenCL renderer (EmberCL) for rendering [default: false].\n"));
INITBOOLOPTION(EarlyClip, Eob(OPT_USE_ALL, OPT_EARLYCLIP, _T("--earlyclip"), false, SO_NONE, "\t--earlyclip Perform clipping of RGB values before spatial filtering for better antialiasing and resizing [default: false].\n"));
INITBOOLOPTION(YAxisUp, Eob(OPT_USE_ALL, OPT_POS_Y_UP, _T("--yaxisup"), false, SO_NONE, "\t--yaxisup Orient the image with the positive y axis pointing up [default: false].\n"));
@ -493,6 +493,10 @@ public:
PARSESTRINGOPTION(OPT_USE_VARS, UseVars);
PARSESTRINGOPTION(OPT_DONT_USE_VARS, DontUseVars);
PARSESTRINGOPTION(OPT_EXTRAS, Extras);
default:
{
break;//Do nothing.
}
}
}
else

View File

@ -21,7 +21,7 @@ static bool WritePpm(const char* filename, unsigned char* image, size_t width, s
if (fopen_s(&file, filename, "wb") == 0)
{
fprintf_s(file, "P6\n");
fprintf_s(file, "%d %d\n255\n", width, height);
fprintf_s(file, "%lu %lu\n255\n", width, height);
b = (size == fwrite(image, 1, size, file));
fclose(file);
@ -57,11 +57,11 @@ static bool WriteJpeg(const char* filename, unsigned char* image, size_t width,
char nickString[64], urlString[128], idString[128];
char bvString[64], niString[64], rtString[64];
char genomeString[65536], verString[64];
//Create the mandatory comment strings.
snprintf_s(genomeString, 65536, "flam3_genome: %s", comments.m_Genome.c_str());
snprintf_s(bvString, 64, "flam3_error_rate: %s", comments.m_Badvals.c_str());
snprintf_s(niString, 64, "flam3_samples: %s", comments.m_NumIters);
snprintf_s(niString, 64, "flam3_samples: %s", comments.m_NumIters.c_str());
snprintf_s(rtString, 64, "flam3_time: %s", comments.m_Runtime.c_str());
snprintf_s(verString, 64, "flam3_version: %s", EmberVersion());
@ -75,7 +75,7 @@ static bool WriteJpeg(const char* filename, unsigned char* image, size_t width,
jpeg_set_defaults(&info);
jpeg_set_quality(&info, quality, TRUE);
jpeg_start_compress(&info, TRUE);
//Write comments to jpeg.
if (enableComments)
{
@ -92,7 +92,7 @@ static bool WriteJpeg(const char* filename, unsigned char* image, size_t width,
snprintf_s(urlString, 128, "flam3_url: %s", url.c_str());
jpeg_write_marker(&info, JPEG_COM, (unsigned char*)urlString, (int)strlen(urlString));
}
if (id != "")
{
snprintf_s(idString, 128, "flam3_id: %s", id.c_str());
@ -150,41 +150,41 @@ static bool WritePng(const char* filename, unsigned char* image, size_t width, s
vector<unsigned char*> rows(height);
text[0].compression = PNG_TEXT_COMPRESSION_NONE;
text[0].key = "flam3_version";
text[0].key = (png_charp)"flam3_version";
text[0].text = (png_charp)EmberVersion();
text[1].compression = PNG_TEXT_COMPRESSION_NONE;
text[1].key = "flam3_nickname";
text[1].key = (png_charp)"flam3_nickname";
text[1].text = (png_charp)nick.c_str();
text[2].compression = PNG_TEXT_COMPRESSION_NONE;
text[2].key = "flam3_url";
text[2].key = (png_charp)"flam3_url";
text[2].text = (png_charp)url.c_str();
text[3].compression = PNG_TEXT_COMPRESSION_NONE;
text[3].key = "flam3_id";
text[3].key = (png_charp)"flam3_id";
text[3].text = (png_charp)id.c_str();
text[4].compression = PNG_TEXT_COMPRESSION_NONE;
text[4].key = "flam3_error_rate";
text[4].key = (png_charp)"flam3_error_rate";
text[4].text = (png_charp)comments.m_Badvals.c_str();
text[5].compression = PNG_TEXT_COMPRESSION_NONE;
text[5].key = "flam3_samples";
text[5].key = (png_charp)"flam3_samples";
text[5].text = (png_charp)comments.m_NumIters.c_str();
text[6].compression = PNG_TEXT_COMPRESSION_NONE;
text[6].key = "flam3_time";
text[6].key = (png_charp)"flam3_time";
text[6].text = (png_charp)comments.m_Runtime.c_str();
text[7].compression = PNG_TEXT_COMPRESSION_zTXt;
text[7].key = "flam3_genome";
text[7].key = (png_charp)"flam3_genome";
text[7].text = (png_charp)comments.m_Genome.c_str();
for (i = 0; i < height; i++)
rows[i] = (unsigned char*)image + i * width * 4 * bytesPerChannel;
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
info_ptr = png_create_info_struct(png_ptr);
if (setjmp(png_jmpbuf(png_ptr)))
@ -202,7 +202,7 @@ static bool WritePng(const char* filename, unsigned char* image, size_t width, s
PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_BASE,
PNG_FILTER_TYPE_BASE);
if (enableComments == 1)
png_set_text(png_ptr, info_ptr, text, PNG_COMMENT_MAX);
@ -232,20 +232,20 @@ static bool WritePng(const char* filename, unsigned char* image, size_t width, s
/// <param name="height">The height.</param>
/// <param name="newSize">The size of the new buffer created</param>
/// <returns>The converted buffer if successful, else NULL.</returns>
static BYTE* ConvertRGBToBMPBuffer(BYTE* buffer, size_t width, size_t height, size_t& newSize)
static unsigned char* ConvertRGBToBMPBuffer(unsigned char* buffer, size_t width, size_t height, size_t& newSize)
{
if (NULL == buffer || width == 0 || height == 0)
return NULL;
if (buffer == nullptr || width == 0 || height == 0)
return nullptr;
size_t padding = 0;
size_t scanlinebytes = width * 3;
while ((scanlinebytes + padding ) % 4 != 0)
while ((scanlinebytes + padding ) % 4 != 0)
padding++;
size_t psw = scanlinebytes + padding;
newSize = height * psw;
BYTE* newBuf = new BYTE[newSize];
unsigned char* newBuf = new unsigned char[newSize];
if (newBuf)
{
@ -274,7 +274,7 @@ static BYTE* ConvertRGBToBMPBuffer(BYTE* buffer, size_t width, size_t height, si
return newBuf;
}
return NULL;
return nullptr;
}
/// <summary>
@ -286,8 +286,9 @@ static BYTE* ConvertRGBToBMPBuffer(BYTE* buffer, size_t width, size_t height, si
/// <param name="height">Height of the image in pixels</param>
/// <param name="paddedSize">Padded size, greater than or equal to total image size.</param>
/// <returns>True if success, else false</returns>
static bool SaveBmp(const char* filename, BYTE* image, size_t width, size_t height, size_t paddedSize)
static bool SaveBmp(const char* filename, unsigned char* image, size_t width, size_t height, size_t paddedSize)
{
#ifdef WIN32
BITMAPFILEHEADER bmfh;
BITMAPINFOHEADER info;
DWORD bwritten;
@ -304,14 +305,14 @@ static bool SaveBmp(const char* filename, BYTE* image, size_t width, size_t heig
info.biSize = sizeof(BITMAPINFOHEADER);
info.biWidth = (LONG)width;
info.biHeight = (LONG)height;
info.biPlanes = 1;
info.biPlanes = 1;
info.biBitCount = 24;
info.biCompression = BI_RGB;
info.biCompression = BI_RGB;
info.biSizeImage = 0;
info.biXPelsPerMeter = 0x0ec4;
info.biYPelsPerMeter = 0x0ec4;
info.biClrUsed = 0;
info.biClrImportant = 0;
info.biXPelsPerMeter = 0x0ec4;
info.biYPelsPerMeter = 0x0ec4;
info.biClrUsed = 0;
info.biClrImportant = 0;
if ((file = CreateFileA(filename, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL)) == NULL)
{
@ -320,24 +321,25 @@ static bool SaveBmp(const char* filename, BYTE* image, size_t width, size_t heig
}
if (WriteFile(file, &bmfh, sizeof (BITMAPFILEHEADER), &bwritten, NULL) == false)
{
{
CloseHandle(file);
return false;
}
if (WriteFile(file, &info, sizeof(BITMAPINFOHEADER), &bwritten, NULL) == false)
{
{
CloseHandle(file);
return false;
}
if (WriteFile(file, image, (DWORD)paddedSize, &bwritten, NULL) == false)
{
{
CloseHandle(file);
return false;
}
CloseHandle(file);
#endif
return true;
}
@ -353,7 +355,7 @@ static bool WriteBmp(const char* filename, unsigned char* image, size_t width, s
{
bool b = false;
size_t newSize;
unique_ptr<BYTE> bgrBuf(ConvertRGBToBMPBuffer(image, width, height, newSize));
unique_ptr<unsigned char> bgrBuf(ConvertRGBToBMPBuffer(image, width, height, newSize));
if (bgrBuf.get())
b = SaveBmp(filename, bgrBuf.get(), width, height, newSize);

View File

@ -3,22 +3,22 @@
@version 3.6
@brief A cross-platform file globbing library providing the ability to
expand wildcards in command-line arguments to a list of all matching
files. It is designed explicitly to be portable to any platform and has
been tested on Windows and Linux. See CSimpleGlobTempl for the class
expand wildcards in command-line arguments to a list of all matching
files. It is designed explicitly to be portable to any platform and has
been tested on Windows and Linux. See CSimpleGlobTempl for the class
definition.
@section features FEATURES
- MIT Licence allows free use in all software (including GPL and
- MIT Licence allows free use in all software (including GPL and
commercial)
- multi-platform (Windows 95/98/ME/NT/2K/XP, Linux, Unix)
- supports most of the standard linux glob() options
- recognition of a forward paths as equivalent to a backward slash
- recognition of a forward paths as equivalent to a backward slash
on Windows. e.g. "c:/path/foo*" is equivalent to "c:\path\foo*".
- implemented with only a single C++ header file
- char, wchar_t and Windows TCHAR in the same program
- complete working examples included
- compiles cleanly at warning level 4 (Windows/VC.NET 2003),
- compiles cleanly at warning level 4 (Windows/VC.NET 2003),
warning level 3 (Windows/VC6) and -Wall (Linux/gcc)
@section usage USAGE
@ -70,12 +70,12 @@
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
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.
</pre>
*/
@ -83,7 +83,7 @@
#ifndef INCLUDED_SimpleGlob
#define INCLUDED_SimpleGlob
/*! @brief The operation of SimpleGlob is fine-tuned via the use of a
/*! @brief The operation of SimpleGlob is fine-tuned via the use of a
combination of the following flags.
The flags may be passed at initialization of the class and used for every
@ -99,15 +99,15 @@
@param SG_GLOB_NOSORT
By default, files are returned in sorted into string order. With this
flag, no sorting is done. This is not compatible with
flag, no sorting is done. This is not compatible with
SG_GLOB_FULLSORT.
@param SG_GLOB_FULLSORT
By default, files are sorted in groups belonging to each filespec that
was added. For example if the filespec "b*" was added before the
filespec "a*" then the argv array will contain all b* files sorted in
order, followed by all a* files sorted in order. If this flag is
specified, the entire array will be sorted ignoring the filespec
was added. For example if the filespec "b*" was added before the
filespec "a*" then the argv array will contain all b* files sorted in
order, followed by all a* files sorted in order. If this flag is
specified, the entire array will be sorted ignoring the filespec
groups.
@param SG_GLOB_NOCHECK
@ -117,7 +117,7 @@
Tilde expansion is carried out (on Unix platforms)
@param SG_GLOB_ONLYDIR
Return only directories which match (not compatible with
Return only directories which match (not compatible with
SG_GLOB_ONLYFILE)
@param SG_GLOB_ONLYFILE
@ -409,7 +409,7 @@ struct SimpleGlobBase
int nFlags = GLOB_MARK | GLOB_NOSORT;
if (a_uiFlags & SG_GLOB_ERR) nFlags |= GLOB_ERR;
if (a_uiFlags & SG_GLOB_TILDE) nFlags |= GLOB_TILDE;
int rc = glob(a_pszFileSpec, nFlags, NULL, &m_glob);
int rc = glob(a_pszFileSpec, nFlags, nullptr, &m_glob);
if (rc == GLOB_NOSPACE) return SG_ERR_MEMORY;
if (rc == GLOB_ABORTED) return SG_ERR_FAILURE;
if (rc == GLOB_NOMATCH) return SG_ERR_NOMATCH;
@ -422,7 +422,7 @@ struct SimpleGlobBase
int FindFirstFileS(const UChar * a_pszFileSpec, unsigned int a_uiFlags) {
char buf[PATH_MAX] = { 0 };
UErrorCode status = U_ZERO_ERROR;
u_strToUTF8(buf, sizeof(buf), NULL, a_pszFileSpec, -1, &status);
u_strToUTF8(buf, sizeof(buf), nullptr, a_pszFileSpec, -1, &status);
if (U_FAILURE(status)) return SG_ERR_FAILURE;
return this->FindFirstFileS(buf, a_uiFlags);
}
@ -457,11 +457,11 @@ struct SimpleGlobBase
#if SG_HAVE_ICU
const UChar * GetFileNameS(UChar) const {
const char * pszFile = this->GetFileNameS((char)0);
if (!pszFile) return NULL;
if (!pszFile) return nullptr;
UErrorCode status = U_ZERO_ERROR;
memset(m_szBuf, 0, sizeof(m_szBuf));
u_strFromUTF8(m_szBuf, PATH_MAX, NULL, pszFile, -1, &status);
if (U_FAILURE(status)) return NULL;
u_strFromUTF8(m_szBuf, PATH_MAX, nullptr, pszFile, -1, &status);
if (U_FAILURE(status)) return nullptr;
return m_szBuf;
}
#endif
@ -495,7 +495,7 @@ struct SimpleGlobBase
SG_FileType GetFileTypeS(const UChar * a_pszPath) const {
char buf[PATH_MAX] = { 0 };
UErrorCode status = U_ZERO_ERROR;
u_strToUTF8(buf, sizeof(buf), NULL, a_pszPath, -1, &status);
u_strToUTF8(buf, sizeof(buf), nullptr, a_pszPath, -1, &status);
if (U_FAILURE(status)) return SG_FILETYPE_INVALID;
return this->GetFileTypeS(buf);
}
@ -558,7 +558,7 @@ public:
@param a_pszFileSpec Filespec to add to the glob.
@return SG_SUCCESS Matching files were added to the glob.
@return SG_ERR_NOMATCH Nothing matched the pattern. To ignore this
@return SG_ERR_NOMATCH Nothing matched the pattern. To ignore this
error compare return value to >= SG_SUCCESS.
@return SG_ERR_MEMORY Out of memory failure.
@return SG_ERR_FAILURE General failure.
@ -574,7 +574,7 @@ public:
@param a_rgpszFileSpec Array of filespec to add to the glob.
@return SG_SUCCESS Matching files were added to the glob.
@return SG_ERR_NOMATCH Nothing matched the pattern. To ignore this
@return SG_ERR_NOMATCH Nothing matched the pattern. To ignore this
error compare return value to >= SG_SUCCESS.
@return SG_ERR_MEMORY Out of memory failure.
@return SG_ERR_FAILURE General failure.
@ -602,8 +602,8 @@ private:
CSimpleGlobTempl & operator=(const CSimpleGlobTempl &); // disabled
/*! @brief The argv array has it's members stored as either an offset into
the string buffer, or as pointers to their string in the buffer. The
offsets are used because if the string buffer is dynamically resized,
the string buffer, or as pointers to their string in the buffer. The
offsets are used because if the string buffer is dynamically resized,
all pointers into that buffer would become invalid.
*/
enum ARG_ARRAY_TYPE { OFFSETS, POINTERS };
@ -620,13 +620,13 @@ private:
/*! @brief Grow the string buffer to the required size. */
bool GrowStringBuffer(size_t a_uiMinSize);
/*! @brief Compare two (possible NULL) strings */
/*! @brief Compare two (possible nullptr) strings */
static int fileSortCompare(const void *a1, const void *a2);
private:
unsigned int m_uiFlags;
ARG_ARRAY_TYPE m_nArgArrayType; //!< argv is indexes or pointers
SOCHAR ** m_rgpArgs; //!< argv
SOCHAR ** m_rgpArgs; //!< argv
int m_nReservedSlots; //!< # client slots in argv array
int m_nArgsSize; //!< allocated size of array
int m_nArgsLen; //!< used length
@ -646,9 +646,9 @@ CSimpleGlobTempl<SOCHAR>::CSimpleGlobTempl(
int a_nReservedSlots
)
{
m_rgpArgs = NULL;
m_rgpArgs = nullptr;
m_nArgsSize = 0;
m_pBuffer = NULL;
m_pBuffer = nullptr;
m_uiBufferSize = 0;
Init(a_uiFlags, a_nReservedSlots);
@ -679,7 +679,7 @@ CSimpleGlobTempl<SOCHAR>::Init(
return SG_ERR_MEMORY;
}
for (int n = 0; n < m_nReservedSlots; ++n) {
m_rgpArgs[n] = NULL;
m_rgpArgs[n] = nullptr;
}
}
@ -693,8 +693,8 @@ CSimpleGlobTempl<SOCHAR>::Add(
)
{
#ifdef _WIN32
// Windows FindFirst/FindNext recognizes forward slash as the same as
// backward slash and follows the directories. We need to do the same
// Windows FindFirst/FindNext recognizes forward slash as the same as
// backward slash and follows the directories. We need to do the same
// when calculating the prefix and when we have no wildcards.
SOCHAR szFileSpec[MAX_PATH];
SimpleGlobUtil::strcpy_s(szFileSpec, MAX_PATH, a_pszFileSpec);
@ -722,10 +722,10 @@ CSimpleGlobTempl<SOCHAR>::Add(
}
#ifdef _WIN32
// Windows doesn't return the directory with the filename, so we need to
// extract the path from the search string ourselves and prefix it to the
// Windows doesn't return the directory with the filename, so we need to
// extract the path from the search string ourselves and prefix it to the
// filename we get back.
const SOCHAR * pszFilename =
const SOCHAR * pszFilename =
SimpleGlobUtil::strrchr(a_pszFileSpec, SG_PATH_CHAR);
if (pszFilename) {
SimpleGlobUtil::strcpy_s(m_szPathPrefix, MAX_PATH, a_pszFileSpec);
@ -820,7 +820,7 @@ CSimpleGlobTempl<SOCHAR>::AppendName(
// ensure that we have enough room in the string buffer (+1 for null)
size_t uiPrefixLen = SimpleGlobUtil::strlen(m_szPathPrefix);
size_t uiLen = uiPrefixLen + SimpleGlobUtil::strlen(a_pszFileName) + 1;
size_t uiLen = uiPrefixLen + SimpleGlobUtil::strlen(a_pszFileName) + 1;
if (a_bIsDir && (m_uiFlags & SG_GLOB_MARK) == SG_GLOB_MARK) {
++uiLen; // need space for the backslash
}
@ -857,14 +857,14 @@ CSimpleGlobTempl<SOCHAR>::SetArgvArrayType(
SG_ASSERT(m_nArgArrayType == OFFSETS);
for (int n = 0; n < m_nArgsLen; ++n) {
m_rgpArgs[n] = (m_rgpArgs[n] == (SOCHAR*)-1) ?
NULL : m_pBuffer + (size_t) m_rgpArgs[n];
nullptr : m_pBuffer + (size_t) m_rgpArgs[n];
}
}
else {
SG_ASSERT(a_nNewType == OFFSETS);
SG_ASSERT(m_nArgArrayType == POINTERS);
for (int n = 0; n < m_nArgsLen; ++n) {
m_rgpArgs[n] = (m_rgpArgs[n] == NULL) ?
m_rgpArgs[n] = (m_rgpArgs[n] == nullptr) ?
(SOCHAR*) -1 : (SOCHAR*) (m_rgpArgs[n] - m_pBuffer);
}
}
@ -879,7 +879,7 @@ CSimpleGlobTempl<SOCHAR>::GrowArgvArray(
{
if (a_nNewLen >= m_nArgsSize) {
static const int SG_ARGV_INITIAL_SIZE = 32;
int nNewSize = (m_nArgsSize > 0) ?
int nNewSize = (m_nArgsSize > 0) ?
m_nArgsSize * 2 : SG_ARGV_INITIAL_SIZE;
while (a_nNewLen >= nNewSize) {
nNewSize *= 2;
@ -900,7 +900,7 @@ CSimpleGlobTempl<SOCHAR>::GrowStringBuffer(
{
if (a_uiMinSize >= m_uiBufferSize) {
static const int SG_BUFFER_INITIAL_SIZE = 1024;
size_t uiNewSize = (m_uiBufferSize > 0) ?
size_t uiNewSize = (m_uiBufferSize > 0) ?
m_uiBufferSize * 2 : SG_BUFFER_INITIAL_SIZE;
while (a_uiMinSize >= uiNewSize) {
uiNewSize *= 2;
@ -925,7 +925,7 @@ CSimpleGlobTempl<SOCHAR>::fileSortCompare(
if (s1 && s2) {
return SimpleGlobUtil::strcasecmp(s1, s2);
}
// NULL sorts first
// nullptr sorts first
return s1 == s2 ? 0 : (s1 ? 1 : -1);
}
@ -937,11 +937,11 @@ CSimpleGlobTempl<SOCHAR>::fileSortCompare(
typedef CSimpleGlobTempl<char> CSimpleGlobA;
/*! @brief wchar_t version of CSimpleGlob */
typedef CSimpleGlobTempl<wchar_t> CSimpleGlobW;
typedef CSimpleGlobTempl<wchar_t> CSimpleGlobW;
#if SG_HAVE_ICU
/*! @brief UChar version of CSimpleGlob */
typedef CSimpleGlobTempl<UChar> CSimpleGlobU;
typedef CSimpleGlobTempl<UChar> CSimpleGlobU;
#endif
#ifdef _UNICODE
@ -949,11 +949,11 @@ typedef CSimpleGlobTempl<UChar> CSimpleGlobU;
# if SG_HAVE_ICU
# define CSimpleGlob CSimpleGlobU
# else
# define CSimpleGlob CSimpleGlobW
# define CSimpleGlob CSimpleGlobW
# endif
#else
/*! @brief TCHAR version dependent on if _UNICODE is defined */
# define CSimpleGlob CSimpleGlobA
# define CSimpleGlob CSimpleGlobA
#endif
#endif // INCLUDED_SimpleGlob

View File

@ -3,70 +3,70 @@
@version 3.6
@brief A cross-platform command line library which can parse almost any
of the standard command line formats in use today. It is designed
explicitly to be portable to any platform and has been tested on Windows
of the standard command line formats in use today. It is designed
explicitly to be portable to any platform and has been tested on Windows
and Linux. See CSimpleOptTempl for the class definition.
@section features FEATURES
- MIT Licence allows free use in all software (including GPL
- MIT Licence allows free use in all software (including GPL
and commercial)
- multi-platform (Windows 95/98/ME/NT/2K/XP, Linux, Unix)
- supports all lengths of option names:
<table width="60%">
<tr><td width="30%"> -
<tr><td width="30%"> -
<td>switch character only (e.g. use stdin for input)
<tr><td> -o
<tr><td> -o
<td>short (single character)
<tr><td> -long
<tr><td> -long
<td>long (multiple character, single switch character)
<tr><td> --longer
<tr><td> --longer
<td>long (multiple character, multiple switch characters)
</table>
- supports all types of arguments for options:
<table width="60%">
<tr><td width="30%"> --option
<tr><td width="30%"> --option
<td>short/long option flag (no argument)
<tr><td> --option ARG
<tr><td> --option ARG
<td>short/long option with separate required argument
<tr><td> --option=ARG
<tr><td> --option=ARG
<td>short/long option with combined required argument
<tr><td> --option[=ARG]
<tr><td> --option[=ARG]
<td>short/long option with combined optional argument
<tr><td> -oARG
<tr><td> -oARG
<td>short option with combined required argument
<tr><td> -o[ARG]
<tr><td> -o[ARG]
<td>short option with combined optional argument
</table>
- supports options with multiple or variable numbers of arguments:
<table width="60%">
<tr><td width="30%"> --multi ARG1 ARG2
<tr><td width="30%"> --multi ARG1 ARG2
<td>Multiple arguments
<tr><td> --multi N ARG-1 ARG-2 ... ARG-N
<tr><td> --multi N ARG-1 ARG-2 ... ARG-N
<td>Variable number of arguments
</table>
- supports case-insensitive option matching on short, long and/or
- supports case-insensitive option matching on short, long and/or
word arguments.
- supports options which do not use a switch character. i.e. a special
word which is construed as an option.
e.g. "foo.exe open /directory/file.txt"
- supports clumping of multiple short options (no arguments) in a string
- supports options which do not use a switch character. i.e. a special
word which is construed as an option.
e.g. "foo.exe open /directory/file.txt"
- supports clumping of multiple short options (no arguments) in a string
e.g. "foo.exe -abcdef file1" <==> "foo.exe -a -b -c -d -e -f file1"
- automatic recognition of a single slash as equivalent to a single
- automatic recognition of a single slash as equivalent to a single
hyphen on Windows, e.g. "/f FILE" is equivalent to "-f FILE".
- file arguments can appear anywhere in the argument list:
"foo.exe file1.txt -a ARG file2.txt --flag file3.txt file4.txt"
files will be returned to the application in the same order they were
files will be returned to the application in the same order they were
supplied on the command line
- short-circuit option matching: "--man" will match "--mandate"
invalid options can be handled while continuing to parse the command
invalid options can be handled while continuing to parse the command
line valid options list can be changed dynamically during command line
processing, i.e. accept different options depending on an option
processing, i.e. accept different options depending on an option
supplied earlier in the command line.
- implemented with only a single C++ header file
- optionally use no C runtime or OS functions
- char, wchar_t and Windows TCHAR in the same program
- complete working examples included
- compiles cleanly at warning level 4 (Windows/VC.NET 2003), warning
- compiles cleanly at warning level 4 (Windows/VC.NET 2003), warning
level 3 (Windows/VC6) and -Wall (Linux/gcc)
@section usage USAGE
@ -89,19 +89,19 @@
</pre>
Note that all options must start with a hyphen even if the slash will
be accepted. This is because the slash character is automatically
converted into a hyphen to test against the list of options.
For example, the following line matches both "-?" and "/?"
converted into a hyphen to test against the list of options.
For example, the following line matches both "-?" and "/?"
(on Windows).
<pre>
{ OPT_HELP, _T("-?"), SO_NONE }, // "-?"
</pre>
<li> Instantiate a CSimpleOpt object supplying argc, argv and the option
<li> Instantiate a CSimpleOpt object supplying argc, argv and the option
table
<pre>
@link CSimpleOptTempl CSimpleOpt @endlink args(argc, argv, g_rgOptions);
</pre>
<li> Process the arguments by calling Next() until it returns false.
On each call, first check for an error by calling LastError(), then
<li> Process the arguments by calling Next() until it returns false.
On each call, first check for an error by calling LastError(), then
either handle the error or process the argument.
<pre>
while (args.Next()) {
@ -142,12 +142,12 @@ ShowFiles(args.FileCount(), args.Files());
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
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.
</pre>
*/
@ -165,24 +165,24 @@ ShowFiles(args.FileCount(), args.Files());
A cross-platform library providing a simple method to parse almost any of
the standard command-line formats in use today.
See the @link SimpleOpt.h SimpleOpt @endlink documentation for full
See the @link SimpleOpt.h SimpleOpt @endlink documentation for full
details.
@section SimpleGlob SimpleGlob
A cross-platform file globbing library providing the ability to
expand wildcards in command-line arguments to a list of all matching
expand wildcards in command-line arguments to a list of all matching
files.
See the @link SimpleGlob.h SimpleGlob @endlink documentation for full
See the @link SimpleGlob.h SimpleGlob @endlink documentation for full
details.
*/
#ifndef INCLUDED_SimpleOpt
#define INCLUDED_SimpleOpt
// Default the max arguments to a fixed value. If you want to be able to
// handle any number of arguments, then predefine this to 0 and it will
// Default the max arguments to a fixed value. If you want to be able to
// handle any number of arguments, then predefine this to 0 and it will
// use an internal dynamically allocated buffer instead.
#ifdef SO_MAX_ARGS
# define SO_STATICBUF SO_MAX_ARGS
@ -196,101 +196,101 @@ ShowFiles(args.FileCount(), args.Files());
typedef enum _ESOError
{
//! No error
SO_SUCCESS = 0,
SO_SUCCESS = 0,
/*! It looks like an option (it starts with a switch character), but
/*! It looks like an option (it starts with a switch character), but
it isn't registered in the option table. */
SO_OPT_INVALID = -1,
SO_OPT_INVALID = -1,
/*! Multiple options matched the supplied option text.
/*! Multiple options matched the supplied option text.
Only returned when NOT using SO_O_EXACT. */
SO_OPT_MULTIPLE = -2,
SO_OPT_MULTIPLE = -2,
/*! Option doesn't take an argument, but a combined argument was
/*! Option doesn't take an argument, but a combined argument was
supplied. */
SO_ARG_INVALID = -3,
SO_ARG_INVALID = -3,
/*! SO_REQ_CMB style-argument was supplied to a SO_REQ_SEP option
Only returned when using SO_O_PEDANTIC. */
SO_ARG_INVALID_TYPE = -4,
SO_ARG_INVALID_TYPE = -4,
//! Required argument was not supplied
SO_ARG_MISSING = -5,
SO_ARG_MISSING = -5,
/*! Option argument looks like another option.
/*! Option argument looks like another option.
Only returned when NOT using SO_O_NOERR. */
SO_ARG_INVALID_DATA = -6
SO_ARG_INVALID_DATA = -6
} ESOError;
//! Option flags
enum _ESOFlags
{
/*! Disallow partial matching of option names */
SO_O_EXACT = 0x0001,
SO_O_EXACT = 0x0001,
/*! Disallow use of slash as an option marker on Windows.
/*! Disallow use of slash as an option marker on Windows.
Un*x only ever recognizes a hyphen. */
SO_O_NOSLASH = 0x0002,
SO_O_NOSLASH = 0x0002,
/*! Permit arguments on single letter options with no equals sign.
/*! Permit arguments on single letter options with no equals sign.
e.g. -oARG or -o[ARG] */
SO_O_SHORTARG = 0x0004,
SO_O_SHORTARG = 0x0004,
/*! Permit single character options to be clumped into a single
/*! Permit single character options to be clumped into a single
option string. e.g. "-a -b -c" <==> "-abc" */
SO_O_CLUMP = 0x0008,
SO_O_CLUMP = 0x0008,
/*! Process the entire argv array for options, including the
/*! Process the entire argv array for options, including the
argv[0] entry. */
SO_O_USEALL = 0x0010,
SO_O_USEALL = 0x0010,
/*! Do not generate an error for invalid options. errors for missing
arguments will still be generated. invalid options will be
treated as files. invalid options in clumps will be silently
/*! Do not generate an error for invalid options. errors for missing
arguments will still be generated. invalid options will be
treated as files. invalid options in clumps will be silently
ignored. */
SO_O_NOERR = 0x0020,
SO_O_NOERR = 0x0020,
/*! Validate argument type pedantically. Return an error when a
separated argument "-opt arg" is supplied by the user as a
combined argument "-opt=arg". By default this is not considered
/*! Validate argument type pedantically. Return an error when a
separated argument "-opt arg" is supplied by the user as a
combined argument "-opt=arg". By default this is not considered
an error. */
SO_O_PEDANTIC = 0x0040,
SO_O_PEDANTIC = 0x0040,
/*! Case-insensitive comparisons for short arguments */
SO_O_ICASE_SHORT = 0x0100,
SO_O_ICASE_SHORT = 0x0100,
/*! Case-insensitive comparisons for long arguments */
SO_O_ICASE_LONG = 0x0200,
SO_O_ICASE_LONG = 0x0200,
/*! Case-insensitive comparisons for word arguments
/*! Case-insensitive comparisons for word arguments
i.e. arguments without any hyphens at the start. */
SO_O_ICASE_WORD = 0x0400,
SO_O_ICASE_WORD = 0x0400,
/*! Case-insensitive comparisons for all arg types */
SO_O_ICASE = 0x0700
SO_O_ICASE = 0x0700
};
/*! Types of arguments that options may have. Note that some of the _ESOFlags
are not compatible with all argument types. SO_O_SHORTARG requires that
relevant options use either SO_REQ_CMB or SO_OPT. SO_O_CLUMP requires
relevant options use either SO_REQ_CMB or SO_OPT. SO_O_CLUMP requires
that relevant options use only SO_NONE.
*/
typedef enum _ESOArgType {
/*! No argument. Just the option flags.
e.g. -o --opt */
SO_NONE,
SO_NONE,
/*! Required separate argument.
/*! Required separate argument.
e.g. -o ARG --opt ARG */
SO_REQ_SEP,
SO_REQ_SEP,
/*! Required combined argument.
/*! Required combined argument.
e.g. -oARG -o=ARG --opt=ARG */
SO_REQ_CMB,
SO_REQ_CMB,
/*! Optional combined argument.
/*! Optional combined argument.
e.g. -o[ARG] -o[=ARG] --opt[=ARG] */
SO_OPT,
SO_OPT,
/*! Multiple separate arguments. The actual number of arguments is
determined programatically at the time the argument is processed.
@ -299,7 +299,7 @@ typedef enum _ESOArgType {
} ESOArgType;
//! this option definition must be the last entry in the table
#define SO_END_OF_OPTIONS { -1, NULL, SO_NONE }
#define SO_END_OF_OPTIONS { -1, nullptr, SO_NONE }
#ifdef _DEBUG
# ifdef _MSC_VER
@ -328,7 +328,7 @@ public:
//SOption()//Added for compatibility with fractal flames.
//{
// nId = 0;
// pszArg = NULL;
// pszArg = nullptr;
// nArgType = SO_NONE;
//}
@ -340,34 +340,34 @@ public:
//}
/*! ID to return for this flag. Optional but must be >= 0 */
int nId;
int nId;
/*! arg string to search for, e.g. "open", "-", "-f", "--file"
/*! arg string to search for, e.g. "open", "-", "-f", "--file"
Note that on Windows the slash option marker will be converted
to a hyphen so that "-f" will also match "/f". */
const SOCHAR * pszArg;
/*! type of argument accepted by this option */
ESOArgType nArgType;
ESOArgType nArgType;
};
/*! @brief Initialize the class. Init() must be called later. */
CSimpleOptTempl()
: m_rgShuffleBuf(NULL)
{
Init(0, NULL, NULL, 0);
CSimpleOptTempl()
: m_rgShuffleBuf(nullptr)
{
Init(0, nullptr, nullptr, 0);
}
/*! @brief Initialize the class in preparation for use. */
CSimpleOptTempl(
int argc,
SOCHAR * argv[],
const SOption * a_rgOptions,
int argc,
SOCHAR * argv[],
const SOption * a_rgOptions,
int a_nFlags = 0
)
: m_rgShuffleBuf(NULL)
{
Init(argc, argv, a_rgOptions, a_nFlags);
)
: m_rgShuffleBuf(nullptr)
{
Init(argc, argv, a_rgOptions, a_nFlags);
}
#ifndef SO_MAX_ARGS
@ -389,17 +389,17 @@ public:
@param a_argc Argument array size
@param a_argv Argument array
@param a_rgOptions Valid option array
@param a_nFlags Optional flags to modify the processing of
@param a_nFlags Optional flags to modify the processing of
the arguments
@return true Successful
@return true Successful
@return false if SO_MAX_ARGC > 0: Too many arguments
if SO_MAX_ARGC == 0: Memory allocation failure
*/
bool Init(
int a_argc,
SOCHAR * a_argv[],
const SOption * a_rgOptions,
int a_argc,
SOCHAR * a_argv[],
const SOption * a_rgOptions,
int a_nFlags = 0
);
@ -407,8 +407,8 @@ public:
@param a_rgOptions Valid option array
*/
inline void SetOptions(const SOption * a_rgOptions) {
m_rgOptions = a_rgOptions;
inline void SetOptions(const SOption * a_rgOptions) {
m_rgOptions = a_rgOptions;
}
/*! @brief Change the current flags during option parsing.
@ -421,16 +421,16 @@ public:
inline void SetFlags(int a_nFlags) { m_nFlags = a_nFlags; }
/*! @brief Query if a particular flag is set */
inline bool HasFlag(int a_nFlag) const {
return (m_nFlags & a_nFlag) == a_nFlag;
inline bool HasFlag(int a_nFlag) const {
return (m_nFlags & a_nFlag) == a_nFlag;
}
/*! @brief Advance to the next option if available.
When all options have been processed it will return false. When true
has been returned, you must check for an invalid or unrecognized
option using the LastError() method. This will be return an error
value other than SO_SUCCESS on an error. All standard data
option using the LastError() method. This will be return an error
value other than SO_SUCCESS on an error. All standard data
(e.g. OptionText(), OptionArg(), OptionId(), etc) will be available
depending on the error.
@ -450,7 +450,7 @@ public:
/*! @brief Return the last error that occurred.
This function must always be called before processing the current
This function must always be called before processing the current
option. This function is available only when Next() has returned true.
*/
inline ESOError LastError() const { return m_nLastError; }
@ -462,7 +462,7 @@ public:
*/
inline int OptionId() const { return m_nOptionId; }
/*! @brief Return the pszArg from the options array for the current
/*! @brief Return the pszArg from the options array for the current
option.
This function is available only when Next() has returned true.
@ -471,7 +471,7 @@ public:
/*! @brief Return the argument for the current option where one exists.
If there is no argument for the option, this will return NULL.
If there is no argument for the option, this will return nullptr.
This function is available only when Next() has returned true.
*/
inline SOCHAR * OptionArg() const { return m_pszOptionArg; }
@ -483,7 +483,7 @@ public:
each time returning the desired number of arguments. Previously
returned argument pointers are remain valid.
If an error occurs during processing, NULL will be returned and
If an error occurs during processing, nullptr will be returned and
the error will be available via LastError().
@param n Number of arguments to return.
@ -523,7 +523,7 @@ private:
// Find the '=' character within a string.
inline SOCHAR * FindEquals(SOCHAR *s) const {
while (*s && *s != (SOCHAR)'=') ++s;
return *s ? s : NULL;
return *s ? s : nullptr;
}
bool IsEqual(SOCHAR a_cLeft, SOCHAR a_cRight, int a_nArgType) const;
@ -537,11 +537,11 @@ private:
}
private:
const SOption * m_rgOptions; //!< pointer to options table
int m_nFlags; //!< flags
const SOption * m_rgOptions; //!< pointer to options table
int m_nFlags; //!< flags
int m_nOptionIdx; //!< current argv option index
int m_nOptionId; //!< id of current option (-1 = invalid)
int m_nNextOption; //!< index of next option
int m_nNextOption; //!< index of next option
int m_nLastArg; //!< last argument, after this are files
int m_argc; //!< argc to process
SOCHAR ** m_argv; //!< argv
@ -573,13 +573,13 @@ CSimpleOptTempl<SOCHAR>::Init(
m_nLastError = SO_SUCCESS;
m_nOptionIdx = 0;
m_nOptionId = -1;
m_pszOptionText = NULL;
m_pszOptionArg = NULL;
m_pszOptionText = nullptr;
m_pszOptionArg = nullptr;
m_nNextOption = (a_nFlags & SO_O_USEALL) ? 0 : 1;
m_szShort[0] = (SOCHAR)'-';
m_szShort[2] = (SOCHAR)'\0';
m_nFlags = a_nFlags;
m_pszClump = NULL;
m_pszClump = nullptr;
#ifdef SO_MAX_ARGS
if (m_argc > SO_MAX_ARGS) {
@ -627,13 +627,13 @@ CSimpleOptTempl<SOCHAR>::Next()
}
}
SO_ASSERT(!m_pszClump || !*m_pszClump);
m_pszClump = NULL;
m_pszClump = nullptr;
// init for the next option
m_nOptionIdx = m_nNextOption;
m_nOptionId = -1;
m_pszOptionText = NULL;
m_pszOptionArg = NULL;
m_pszOptionText = nullptr;
m_pszOptionArg = nullptr;
m_nLastError = SO_SUCCESS;
// find the next option
@ -642,7 +642,7 @@ CSimpleOptTempl<SOCHAR>::Next()
int nOptIdx = m_nOptionIdx;
while (nTableIdx < 0 && nOptIdx < m_nLastArg) {
SOCHAR * pszArg = m_argv[nOptIdx];
m_pszOptionArg = NULL;
m_pszOptionArg = nullptr;
// find this option in the options table
cFirst = PrepareArg(pszArg);
@ -698,7 +698,7 @@ CSimpleOptTempl<SOCHAR>::Next()
m_pszOptionText = pszArg;
break;
}
pszArg[0] = cFirst;
++nOptIdx;
if (m_pszOptionArg) {
@ -736,7 +736,7 @@ CSimpleOptTempl<SOCHAR>::Next()
case SO_REQ_SEP:
if (m_pszOptionArg) {
// they wanted separate args, but we got a combined one,
// they wanted separate args, but we got a combined one,
// unless we are pedantic, just accept it.
if (HasFlag(SO_O_PEDANTIC)) {
m_nLastError = SO_ARG_INVALID_TYPE;
@ -759,6 +759,8 @@ CSimpleOptTempl<SOCHAR>::Next()
// nothing to do. Caller must now check for valid arguments
// using GetMultiArg()
break;
default:
break;
}
}
@ -769,9 +771,9 @@ CSimpleOptTempl<SOCHAR>::Next()
// we need to return the separate arg if required, just re-use the
// multi-arg code because it all does the same thing
if ( nArgType == SO_REQ_SEP
&& !m_pszOptionArg
&& m_nLastError == SO_SUCCESS)
if ( nArgType == SO_REQ_SEP
&& !m_pszOptionArg
&& m_nLastError == SO_SUCCESS)
{
SOCHAR ** ppArgs = MultiArg(1);
if (ppArgs) {
@ -821,8 +823,8 @@ CSimpleOptTempl<SOCHAR>::NextClumped()
// prepare for the next clumped option
m_szShort[1] = *m_pszClump++;
m_nOptionId = -1;
m_pszOptionText = NULL;
m_pszOptionArg = NULL;
m_pszOptionText = nullptr;
m_pszOptionArg = nullptr;
m_nLastError = SO_SUCCESS;
// lookup this option, ensure that we are using exact matching
@ -950,7 +952,7 @@ CSimpleOptTempl<SOCHAR>::CalcMatch(
// match and skip leading hyphens
while (*a_pszSource == (SOCHAR)'-' && *a_pszSource == *a_pszTest) {
++a_pszSource;
++a_pszSource;
++a_pszTest;
}
if (*a_pszSource == (SOCHAR)'-' || *a_pszTest == (SOCHAR)'-') {
@ -960,8 +962,8 @@ CSimpleOptTempl<SOCHAR>::CalcMatch(
// find matching number of characters in the strings
int nLen = 0;
while (*a_pszSource && IsEqual(*a_pszSource, *a_pszTest, nArgType)) {
++a_pszSource;
++a_pszTest;
++a_pszSource;
++a_pszTest;
++nLen;
}
@ -1014,7 +1016,7 @@ CSimpleOptTempl<SOCHAR>::MultiArg(
// ensure we have enough arguments
if (m_nNextOption + a_nCount > m_nLastArg) {
m_nLastError = SO_ARG_MISSING;
return NULL;
return nullptr;
}
// our argument array
@ -1028,7 +1030,7 @@ CSimpleOptTempl<SOCHAR>::MultiArg(
if (rgpszArg[n][0] == (SOCHAR)'-') {
rgpszArg[n][0] = ch;
m_nLastError = SO_ARG_INVALID_DATA;
return NULL;
return nullptr;
}
rgpszArg[n][0] = ch;
}
@ -1045,18 +1047,18 @@ CSimpleOptTempl<SOCHAR>::MultiArg(
// ---------------------------------------------------------------------------
/*! @brief ASCII/MBCS version of CSimpleOpt */
typedef CSimpleOptTempl<char> CSimpleOptA;
typedef CSimpleOptTempl<char> CSimpleOptA;
/*! @brief wchar_t version of CSimpleOpt */
typedef CSimpleOptTempl<wchar_t> CSimpleOptW;
typedef CSimpleOptTempl<wchar_t> CSimpleOptW;
#if defined(_UNICODE)
/*! @brief TCHAR version dependent on if _UNICODE is defined */
# define CSimpleOpt CSimpleOptW
# define CSimpleOpt CSimpleOptW
# define CharT wchar_t
#else
/*! @brief TCHAR version dependent on if _UNICODE is defined */
# define CSimpleOpt CSimpleOptA
# define CSimpleOpt CSimpleOptA
# define CharT char
#endif

View File

@ -47,7 +47,7 @@ bool EmberGenome(EmberOptions& opt)
if (opt.DumpArgs())
cout << opt.GetValues(OPT_USE_GENOME) << endl;
if (opt.OpenCLInfo())
{
cout << "\nOpenCL Info: " << endl;
@ -71,7 +71,7 @@ bool EmberGenome(EmberOptions& opt)
eMutateMode mutMeth;
Ember<T> orig, save, selp0, selp1, parent0, parent1;
Ember<T> result, result1, result2, result3, interpolated;
Ember<T>* aselp0, *aselp1, *pTemplate = NULL;
Ember<T>* aselp0, *aselp1, *pTemplate = nullptr;
XmlToEmber<T> parser;
EmberToXml<T> emberToXml;
VariationList<T> varList;
@ -99,12 +99,12 @@ bool EmberGenome(EmberOptions& opt)
if (!opt.EmberCL())
{
if (opt.ThreadCount() != 0)
renderer->ThreadCount(opt.ThreadCount(), opt.IsaacSeed() != "" ? opt.IsaacSeed().c_str() : NULL);
renderer->ThreadCount(opt.ThreadCount(), opt.IsaacSeed() != "" ? opt.IsaacSeed().c_str() : nullptr);
}
else
{
cout << "Using OpenCL to render." << endl;
if (opt.Verbose())
{
cout << "Platform: " << wrapper.PlatformName(opt.Platform()) << endl;
@ -147,7 +147,7 @@ bool EmberGenome(EmberOptions& opt)
noVars.push_back(VAR_SEPARATION);
noVars.push_back(VAR_SPLIT);
noVars.push_back(VAR_SPLITS);
//Loop over the novars and set ivars to the complement.
for (i = 0; i < varList.Size(); i++)
{
@ -241,7 +241,7 @@ bool EmberGenome(EmberOptions& opt)
{
if (!ParseEmberFile(parser, opt.TemplateFile(), templateEmbers))
return false;
if (templateEmbers.size() > 1)
cout << "More than one control point in template, ignoring all but first." << endl;
@ -290,7 +290,7 @@ bool EmberGenome(EmberOptions& opt)
{
if (pTemplate)
tools.ApplyTemplate(embers[i], *pTemplate);
tools.Offset(embers[i], (T)opt.OffsetX(), (T)opt.OffsetY());
cout << emberToXml.ToString(embers[i], opt.Extras(), opt.PrintEditDepth(), !opt.NoEdits(), false, opt.HexPalette());
}
@ -337,7 +337,7 @@ bool EmberGenome(EmberOptions& opt)
if (!exactTimeMatch)
{
Interpolater<T>::Interpolate(embers, T(ftime), T(opt.Stagger()), interpolated);
for (i = 0; i < embers.size(); i++)
{
if (ftime == (unsigned int)(embers[i].m_Time - 1))
@ -350,7 +350,7 @@ bool EmberGenome(EmberOptions& opt)
if (!exactTimeMatch)
interpolated.m_AffineInterp = INTERP_LINEAR;
}
if (pTemplate)
tools.ApplyTemplate(interpolated, *pTemplate);
@ -405,7 +405,7 @@ bool EmberGenome(EmberOptions& opt)
result = embers.back();
tools.Spin(embers.back(), pTemplate, result, frameCount, 0);
cout << emberToXml.ToString(result, opt.Extras(), opt.PrintEditDepth(), !opt.NoEdits(), false, opt.HexPalette());
if (opt.Enclosed())
cout << "</sequence>" << endl;
@ -415,7 +415,7 @@ bool EmberGenome(EmberOptions& opt)
if (doInter || doRotate)
{
frame = std::max(opt.Frame(), opt.Time());
if (opt.Frames() == 0)
{
cout << "nframes must be positive and non-zero, not " << opt.Frames() << "." << endl;
@ -463,7 +463,7 @@ bool EmberGenome(EmberOptions& opt)
if (opt.Enclosed())
cout << "</pick>" << endl;
return true;
}
@ -477,7 +477,7 @@ bool EmberGenome(EmberOptions& opt)
T oldX, oldY;
embers[i].DeleteMotionElements();
oldX = embers[i].m_CenterX;
oldY = embers[i].m_CenterY;
embers[i].m_FinalRasH = (unsigned int)((T)embers[i].m_FinalRasH / (T)opt.Frames());
@ -490,7 +490,7 @@ bool EmberGenome(EmberOptions& opt)
if (pTemplate)
tools.ApplyTemplate(embers[i], *pTemplate);
tools.Offset(embers[i], T(opt.OffsetX()), T(opt.OffsetY()));
cout << emberToXml.ToString(embers[i], opt.Extras(), opt.PrintEditDepth(), !opt.NoEdits(), false, opt.HexPalette());
}
@ -534,7 +534,7 @@ bool EmberGenome(EmberOptions& opt)
selp0 = embers[rand.Rand() % embers.size()];
save = selp0;
aselp0 = &selp0;
aselp1 = NULL;
aselp1 = nullptr;
os << tools.TruncateVariations(save, 5);
save.m_Edits = emberToXml.CreateNewEditdoc(aselp0, aselp1, os.str(), opt.Nick(), opt.Url(), opt.Id(), opt.Comment(), opt.SheepGen(), opt.SheepId());
}
@ -552,7 +552,7 @@ bool EmberGenome(EmberOptions& opt)
selp0 = embers[rand.Rand() % embers.size()];
orig = selp0;
aselp0 = &selp0;
aselp1 = NULL;
aselp1 = nullptr;
if (opt.Method() == "")
mutMeth = MUTATE_NOT_SPECIFIED;
@ -581,7 +581,7 @@ bool EmberGenome(EmberOptions& opt)
//Scan string returned for 'mutate color'.
if (strstr(os.str().c_str(), "mutate color"))
didColor = true;
if (orig.m_Name != "")
{
os2.str("");
@ -628,8 +628,8 @@ bool EmberGenome(EmberOptions& opt)
os << "random";
randomMode = true;
tools.Random(orig, vars, opt.Symmetry(), 0);
aselp0 = NULL;
aselp1 = NULL;
aselp0 = nullptr;
aselp1 = nullptr;
}
//Adjust bounding box half the time.
@ -711,7 +711,7 @@ bool EmberGenome(EmberOptions& opt)
if (opt.Debug())
cout << "avgPix = " << avgPix << " fractionBlack = " << fractionBlack << " fractionWhite = " << fractionWhite << " n = " << n << endl;
orig.Clear();
count++;
} while ((avgPix < opt.AvgThresh() ||
@ -727,7 +727,7 @@ bool EmberGenome(EmberOptions& opt)
tools.ApplyTemplate(save, *pTemplate);
save.m_Time = T(rep);
if (opt.MaxXforms() != UINT_MAX)
{
save.m_Symmetry = 0;
@ -756,32 +756,37 @@ bool EmberGenome(EmberOptions& opt)
/// <returns>0 if successful, else 1.</returns>
int _tmain(int argc, _TCHAR* argv[])
{
bool b, d = true;
bool b = false;
EmberOptions opt;
//Required for large allocs, else GPU memory usage will be severely limited to small sizes.
//This must be done in the application and not in the EmberCL DLL.
#ifdef WIN32
_putenv_s("GPU_MAX_ALLOC_PERCENT", "100");
#else
putenv((char*)"GPU_MAX_ALLOC_PERCENT=100");
#endif
if (opt.Populate(argc, argv, OPT_USE_GENOME))
return 0;
if (!opt.Populate(argc, argv, OPT_USE_GENOME))
{
#ifdef DO_DOUBLE
if (opt.Bits() == 64)
{
b = EmberGenome<double, double>(opt);
}
else
#endif
if (opt.Bits() == 33)
{
b = EmberGenome<float, float>(opt);
}
else if (opt.Bits() == 32)
{
cout << "Bits 32/int histogram no longer supported. Using bits == 33 (float)." << endl;
b = EmberGenome<float, float>(opt);
if (opt.Bits() == 64)
{
b = EmberGenome<double, double>(opt);
}
else
#endif
if (opt.Bits() == 33)
{
b = EmberGenome<float, float>(opt);
}
else if (opt.Bits() == 32)
{
cout << "Bits 32/int histogram no longer supported. Using bits == 33 (float)." << endl;
b = EmberGenome<float, float>(opt);
}
}
return b ? 0 : 1;
}
}

View File

@ -9,7 +9,7 @@
/// <param name="opt">A populated EmberOptions object which specifies all program options to be used</param>
/// <returns>True if success, else false.</returns>
template <typename T, typename bucketT>
bool EmberRender(EmberOptions& opt)
bool EmberRender(EmberOptions& opt)
{
OpenCLWrapper wrapper;
@ -76,7 +76,7 @@ bool EmberRender(EmberOptions& opt)
cout << "Using " << opt.ThreadCount() << " manually specified threads." << endl;
}
renderer->ThreadCount(opt.ThreadCount(), opt.IsaacSeed() != "" ? opt.IsaacSeed().c_str() : NULL);
renderer->ThreadCount(opt.ThreadCount(), opt.IsaacSeed() != "" ? opt.IsaacSeed().c_str() : nullptr);
}
else
{
@ -92,7 +92,7 @@ bool EmberRender(EmberOptions& opt)
cout << "Cannot specify threads with OpenCL, using 1 thread." << endl;
opt.ThreadCount(1);
renderer->ThreadCount(opt.ThreadCount(), opt.IsaacSeed() != "" ? opt.IsaacSeed().c_str() : NULL);
renderer->ThreadCount(opt.ThreadCount(), opt.IsaacSeed() != "" ? opt.IsaacSeed().c_str() : nullptr);
if (opt.BitsPerChannel() != 8)
{
@ -151,7 +151,7 @@ bool EmberRender(EmberOptions& opt)
renderer->Transparency(opt.Transparency());
renderer->NumChannels(channels);
renderer->BytesPerChannel(opt.BitsPerChannel() / 8);
renderer->Callback(opt.DoProgress() ? progress.get() : NULL);
renderer->Callback(opt.DoProgress() ? progress.get() : nullptr);
for (i = 0; i < embers.size(); i++)
{
@ -180,7 +180,7 @@ bool EmberRender(EmberOptions& opt)
}
//Cast to double in case the value exceeds 2^32.
double imageMem = (double)renderer->NumChannels() * (double)embers[i].m_FinalRasW
double imageMem = (double)renderer->NumChannels() * (double)embers[i].m_FinalRasW
* (double)embers[i].m_FinalRasH * (double)renderer->BytesPerChannel();
double maxMem = pow(2.0, double((sizeof(void*) * 8) - 1));
@ -274,7 +274,7 @@ bool EmberRender(EmberOptions& opt)
VerbosePrint("Bad values: " << stats.m_Badvals);
VerbosePrint("Render time: " + t.Format(stats.m_RenderMs));
VerbosePrint("Pure iter time: " + t.Format(stats.m_IterMs));
VerbosePrint("Iters/sec: " << unsigned __int64(stats.m_Iters / (stats.m_IterMs / 1000.0)) << endl);
VerbosePrint("Iters/sec: " << size_t(stats.m_Iters / (stats.m_IterMs / 1000.0)) << endl);
VerbosePrint("Writing " + filename);
if ((opt.Format() == "jpg" || opt.Format() == "bmp") && renderer->NumChannels() == 4)
@ -323,32 +323,37 @@ bool EmberRender(EmberOptions& opt)
/// <returns>0 if successful, else 1.</returns>
int _tmain(int argc, _TCHAR* argv[])
{
bool b, d = true;
bool b = false;
EmberOptions opt;
//Required for large allocs, else GPU memory usage will be severely limited to small sizes.
//This must be done in the application and not in the EmberCL DLL.
#ifdef WIN32
_putenv_s("GPU_MAX_ALLOC_PERCENT", "100");
#else
putenv((char*)"GPU_MAX_ALLOC_PERCENT=100");
#endif
if (opt.Populate(argc, argv, OPT_USE_RENDER))
return 0;
if (!opt.Populate(argc, argv, OPT_USE_RENDER))
{
#ifdef DO_DOUBLE
if (opt.Bits() == 64)
{
b = EmberRender<double, double>(opt);
}
else
if (opt.Bits() == 64)
{
b = EmberRender<double, double>(opt);
}
else
#endif
if (opt.Bits() == 33)
{
b = EmberRender<float, float>(opt);
}
else if (opt.Bits() == 32)
{
cout << "Bits 32/int histogram no longer supported. Using bits == 33 (float)." << endl;
b = EmberRender<float, float>(opt);
if (opt.Bits() == 33)
{
b = EmberRender<float, float>(opt);
}
else if (opt.Bits() == 32)
{
cout << "Bits 32/int histogram no longer supported. Using bits == 33 (float)." << endl;
b = EmberRender<float, float>(opt);
}
}
return b ? 0 : 1;
}
}