Commit afe76c1e authored by Boudewijn Rempt's avatar Boudewijn Rempt

remove define for a sane vc

parent 61c8f3fe
......@@ -315,9 +315,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
macro_optional_find_package(Vc)
macro_log_feature(Vc_FOUND "Vc" "Portable, zero-overhead SIMD library for C++" "http://code.compeng.uni-frankfurt.de/projects/vc" FALSE "" "Required by the Krita for vectorization")
macro_bool_to_01(Vc_FOUND HAVE_VC)
if(NOT MSVC)
macro_bool_to_01(Vc_FOUND HAVE_SANE_VC)
endif(NOT MSVC)
configure_file(config-vc.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-vc.h )
if(HAVE_VC)
......
......@@ -2,6 +2,3 @@
/* Define if you have Vc, the vectorization library */
#cmakedefine HAVE_VC 1
#cmakedefine HAVE_SANE_VC 1
......@@ -11,11 +11,11 @@ if(OPENEXR_FOUND)
endif(OPENEXR_FOUND)
set(LINK_VC_LIB)
if(HAVE_SANE_VC)
if(HAVE_VC)
include_directories(${Vc_INCLUDE_DIR})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Vc_DEFINITIONS}")
set(LINK_VC_LIB ${Vc_LIBRARIES})
endif(HAVE_SANE_VC)
endif(HAVE_VC)
add_subdirectory(tests)
add_subdirectory(benchmarks)
......
......@@ -39,10 +39,10 @@ struct AlphaDarkenCompositor32 {
* \p src_aligned.
* o the \p dst pointer must always(!) be aligned to the boundary
* of a streaming vector. Unaligned writes are really expensive.
* o This function is *never* used if HAVE_SANE_VC is not present
* o This function is *never* used if HAVE_VC is not present
*/
#ifdef HAVE_SANE_VC
#ifdef HAVE_VC
template<bool haveMask, bool src_aligned>
static ALWAYS_INLINE void compositeVector(const quint8 *src, quint8 *dst, const quint8 *mask, float opacity, float flow)
......@@ -139,7 +139,7 @@ struct AlphaDarkenCompositor32 {
KoStreamedMath::write_channels_32(dst, dst_alpha, dst_c1, dst_c2, dst_c3);
}
#endif /* HAVE_SANE_VC */
#endif /* HAVE_VC */
/**
* Composes one pixel of the source into the destination
......
......@@ -29,7 +29,7 @@
#include "config-vc.h"
#ifdef HAVE_SANE_VC
#ifdef HAVE_VC
#include <Vc/global.h>
#include <Vc/common/support.h>
#endif
......@@ -37,7 +37,7 @@
KoCompositeOp* KoOptimizedCompositeOpFactory::createAlphaDarkenOp32(const KoColorSpace *cs)
{
#if defined HAVE_SANE_VC
#if defined HAVE_VC
if (Vc::currentImplementationSupported()) {
return new KoOptimizedCompositeOpAlphaDarken32(cs);
}
......@@ -47,7 +47,7 @@ KoCompositeOp* KoOptimizedCompositeOpFactory::createAlphaDarkenOp32(const KoColo
KoCompositeOp* KoOptimizedCompositeOpFactory::createOverOp32(const KoColorSpace *cs)
{
#if defined HAVE_SANE_VC
#if defined HAVE_VC
if (Vc::currentImplementationSupported()) {
return new KoOptimizedCompositeOpOver32(cs);
}
......
......@@ -31,7 +31,7 @@ template<typename channels_type, typename pixel_type, bool alphaLocked, bool all
struct OverCompositor32 {
// \see docs in AlphaDarkenCompositor32
#ifdef HAVE_SANE_VC
#ifdef HAVE_VC
template<bool haveMask, bool src_aligned>
static ALWAYS_INLINE void compositeVector(const quint8 *src, quint8 *dst, const quint8 *mask, float opacity, float flow)
......@@ -119,7 +119,7 @@ struct OverCompositor32 {
KoStreamedMath::write_channels_32(dst, new_alpha, dst_c1, dst_c2, dst_c3);
}
#endif /* HAVE_SANE_VC */
#endif /* HAVE_VC */
template <bool haveMask>
static ALWAYS_INLINE void compositeOnePixelScalar(const channels_type *src, channels_type *dst, const quint8 *mask, float opacity, float flow, const QBitArray &channelFlags)
......
......@@ -22,7 +22,7 @@
#include "config-vc.h"
#ifdef HAVE_SANE_VC
#ifdef HAVE_VC
#include <Vc/Vc>
#include <Vc/IO>
#endif
......@@ -86,7 +86,7 @@ static inline quint8 lerp_mixed_u8_float(quint8 a, quint8 b, float alpha) {
return quint8(qint16(b - a) * alpha + a);
}
#if defined HAVE_SANE_VC
#if defined HAVE_VC
/**
* Get a vector containing first Vc::float_v::Size values of mask.
......@@ -304,7 +304,7 @@ template<bool useMask, bool useFlow, class Compositor>
}
}
#else /* if ! defined HAVE_SANE_VC */
#else /* if ! defined HAVE_VC */
/**
* Fall back to the scalar version of the composition.
......@@ -320,7 +320,7 @@ template<bool useMask, bool useFlow, class Compositor>
genericComposite32_novector<useMask, useFlow, Compositor>(params);
}
#endif /* HAVE_SANE_VC */
#endif /* HAVE_VC */
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment