mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 21:20:07 -05:00
7c856c929c
-Really fix locking of affine scale. --Code changes -Remove dependency projects from the solution. Move to a project design where they are built once via command line and stored in a /Deps folder. --Because of this, libpng is built as a static lib instead of a dll because that's what its command line makefile supports. --Remove libpng16.dll from Wix installer. -Remove all configs except for debug and release. -Remove all platforms except for x64. -Add #define __TBB_NO_IMPLICIT_LINKAGE 1 to prevent tbb from locking for tbb_debug.lib by default on debug builds. -Put Ember.rc in a filter folder in the project. -Place pragma warning disable statements in PCH files rather than in projects. This makes it easier when using Qt Creator. -Move all resource files to the MSVC folder. -Set all targets in QtCreator project to their lowercase names to be more *nix friendly. Set -l link statements to use these new lowercase names for ember and embercl. -Rework projects to favor shadow builds. -Remove the symlinks.sh file and all references to it. It was never needed. Instead, just specify multiple include and link paths in the .pro files. -Change WIN32 to _WIN32. -Fix a few code warnings.
78 lines
2.3 KiB
C++
78 lines
2.3 KiB
C++
#pragma once
|
|
|
|
#include "EmberCLPch.h"
|
|
#include "EmberCLStructs.h"
|
|
#include "EmberCLFunctions.h"
|
|
|
|
/// <summary>
|
|
/// DEOpenCLKernelCreator class.
|
|
/// </summary>
|
|
|
|
//#define ROW_ONLY_DE 1
|
|
|
|
namespace EmberCLns
|
|
{
|
|
/// <summary>
|
|
/// Kernel creator for density filtering.
|
|
/// This implements both basic log scale filtering
|
|
/// as well as the full flam3 density estimation filtering
|
|
/// in OpenCL.
|
|
/// Several conditionals are present in the CPU version. They
|
|
/// are stripped out of the kernels and instead a separate kernel
|
|
/// is created for every possible case.
|
|
/// If the filter width is 9 or less, then the entire process can be
|
|
/// done in shared memory which is very fast.
|
|
/// However, if the filter width is greater than 9, shared memory is not
|
|
/// used and all filtering is done directly with main global VRAM. This
|
|
/// ends up being not much faster than doing it on the CPU.
|
|
/// String members are kept for the program source and entry points
|
|
/// for each version of the program.
|
|
/// </summary>
|
|
class EMBERCL_API DEOpenCLKernelCreator
|
|
{
|
|
public:
|
|
DEOpenCLKernelCreator(bool doublePrecision, bool nVidia);
|
|
|
|
//Accessors.
|
|
const string& LogScaleAssignDEKernel() const;
|
|
const string& LogScaleAssignDEEntryPoint() const;
|
|
const string& GaussianDEKernel(size_t ss, uint filterWidth) const;
|
|
const string& GaussianDEEntryPoint(size_t ss, uint filterWidth) const;
|
|
|
|
//Miscellaneous static functions.
|
|
static uint MaxDEFilterSize();
|
|
static double SolveMaxDERad(double desiredFilterSize, double ss);
|
|
static uint SolveMaxBoxSize(uint localMem);
|
|
|
|
private:
|
|
//Kernel creators.
|
|
string CreateLogScaleAssignDEKernelString();
|
|
string CreateGaussianDEKernel(size_t ss);
|
|
string CreateGaussianDEKernelNoLocalCache(size_t ss);
|
|
|
|
string m_LogScaleAssignDEKernel;
|
|
string m_LogScaleAssignDEEntryPoint;
|
|
|
|
string m_GaussianDEWithoutSsKernel;
|
|
string m_GaussianDEWithoutSsEntryPoint;
|
|
|
|
string m_GaussianDESsWithScfKernel;
|
|
string m_GaussianDESsWithScfEntryPoint;
|
|
|
|
string m_GaussianDESsWithoutScfKernel;
|
|
string m_GaussianDESsWithoutScfEntryPoint;
|
|
|
|
string m_GaussianDEWithoutSsNoCacheKernel;
|
|
string m_GaussianDEWithoutSsNoCacheEntryPoint;
|
|
|
|
string m_GaussianDESsWithScfNoCacheKernel;
|
|
string m_GaussianDESsWithScfNoCacheEntryPoint;
|
|
|
|
string m_GaussianDESsWithoutScfNoCacheKernel;
|
|
string m_GaussianDESsWithoutScfNoCacheEntryPoint;
|
|
|
|
bool m_DoublePrecision;
|
|
bool m_NVidia;
|
|
};
|
|
}
|