Skip to content

Commit

Permalink
Reorganize directories to match installation
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Kretz <kretz@kde.org>
  • Loading branch information
mattkretz committed Sep 3, 2018
1 parent e1c4bd6 commit 5519ed0
Show file tree
Hide file tree
Showing 171 changed files with 33 additions and 36 deletions.
11 changes: 4 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "" AND NOT CMAKE_CXX_FLAGS MATCHES "-O[123]")
message(STATUS "WARNING! It seems you are compiling without optimization. Please set CMAKE_BUILD_TYPE.")
endif(CMAKE_BUILD_TYPE STREQUAL "" AND NOT CMAKE_CXX_FLAGS MATCHES "-O[123]")

include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}) # ${CMAKE_CURRENT_SOURCE_DIR}/include)

add_custom_target(other VERBATIM)
add_custom_target(Scalar COMMENT "build Scalar code" VERBATIM)
Expand All @@ -105,7 +105,6 @@ add_custom_target(AVX2 COMMENT "build AVX2 code" VERBATIM)
AddCompilerFlag(-ftemplate-depth=128 CXX_FLAGS CMAKE_CXX_FLAGS)

set(libvc_compile_flags "-DVc_COMPILE_LIB")
set(libvc_mic_compile_flags "-DVc_COMPILE_LIB")
AddCompilerFlag("-fPIC" CXX_FLAGS libvc_compile_flags)

# -fstack-protector is the default of GCC, but at least Ubuntu changes the default to -fstack-protector-strong, which is crazy
Expand Down Expand Up @@ -165,13 +164,13 @@ endif()
add_dependencies(other Vc)

install(TARGETS Vc DESTINATION lib${LIB_SUFFIX})
install(DIRECTORY include/Vc/ DESTINATION include/Vc)
install(DIRECTORY Vc/ DESTINATION include/Vc)

# Install all implementation headers
install(DIRECTORY scalar sse avx mic common traits DESTINATION include/Vc FILES_MATCHING REGEX "/*.(h|tcc|def)$")
install(DIRECTORY Vc/scalar Vc/sse Vc/avx Vc/common Vc/traits DESTINATION include/Vc FILES_MATCHING REGEX "/*.(h|tcc|def)$")

# read version parts from version.h to be put into VcConfig.cmake
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/include/Vc/version.h _version_lines REGEX "^#define Vc_VERSION_STRING ")
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/Vc/version.h _version_lines REGEX "^#define Vc_VERSION_STRING ")
string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" _version_matches "${_version_lines}")
set(Vc_VERSION_MAJOR ${CMAKE_MATCH_1})
set(Vc_VERSION_MINOR ${CMAKE_MATCH_2})
Expand All @@ -188,8 +187,6 @@ install(FILES
cmake/AddCompilerFlag.cmake
cmake/CheckCCompilerFlag.cmake
cmake/CheckCXXCompilerFlag.cmake
cmake/CheckMicCCompilerFlag.cmake
cmake/CheckMicCXXCompilerFlag.cmake
cmake/OptimizeForArchitecture.cmake
cmake/FindVc.cmake
${CMAKE_CURRENT_BINARY_DIR}/cmake/VcConfig.cmake
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion avx/intrinsics.h → Vc/avx/intrinsics.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef VC_AVX_INTRINSICS_H_
#define VC_AVX_INTRINSICS_H_

#include <Vc/global.h>
#include "../global.h"
#include "../traits/type_traits.h"

// see comment in sse/intrinsics.h
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion common/const.h → Vc/common/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define VC_COMMON_CONST_H_

#include <type_traits>
#include <Vc/global.h>
#include "../global.h"

namespace Vc_VERSIONED_NAMESPACE
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef VC_COMMON_FIX_CLANG_EMMINTRIN_H_
#define VC_COMMON_FIX_CLANG_EMMINTRIN_H_

#include <Vc/global.h>
#include "../global.h"

#if (defined Vc_CLANG && Vc_CLANG < 0x30700) || (defined Vc_APPLECLANG && Vc_APPLECLANG < 0x70000)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion common/iif.h → Vc/common/iif.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef VC_COMMON_IIF_H_
#define VC_COMMON_IIF_H_

#include <Vc/type_traits>
#include "../type_traits"
#include "macros.h"

namespace Vc_VERSIONED_NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion common/indexsequence.h → Vc/common/indexsequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef VC_COMMON_INDEXSEQUENCE_H_
#define VC_COMMON_INDEXSEQUENCE_H_

#include <Vc/global.h>
#include "../global.h"

namespace Vc_VERSIONED_NAMESPACE
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion common/macros.h → Vc/common/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef VC_COMMON_MACROS_H_
#define VC_COMMON_MACROS_H_

#include <Vc/global.h>
#include "../global.h"


#ifdef Vc_MSVC
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion common/simdarray.h → Vc/common/simdarray.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//#define Vc_DEBUG_SIMD_CAST 1
//#define Vc_DEBUG_SORTED 1
#if defined Vc_DEBUG_SIMD_CAST || defined Vc_DEBUG_SORTED
#include <Vc/IO>
#include "../IO"
#endif

#include <array>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion common/types.h → Vc/common/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <cstdio>
#endif

#include <Vc/global.h>
#include "../global.h"
#include "../traits/type_traits.h"
#include "permutation.h"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/avx_sorthelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}}}*/

#include <avx/vector.h>
#include <avx/debug.h>
#include <avx/macros.h>
#include <Vc/avx/vector.h>
#include <Vc/avx/debug.h>
#include <Vc/avx/macros.h>

namespace Vc_VERSIONED_NAMESPACE
{
Expand Down
8 changes: 4 additions & 4 deletions src/const.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}}}*/

#include "avx/const_data.h"
#include "sse/const_data.h"
#include <Vc/avx/const_data.h>
#include <Vc/sse/const_data.h>
#include <Vc/version.h>

#include <cstdio>
#include <cstdlib>
#include <cstring>

#include "common/const.h"
#include "common/macros.h"
#include <Vc/common/const.h>
#include <Vc/common/macros.h>

namespace Vc_VERSIONED_NAMESPACE
{
Expand Down
4 changes: 2 additions & 2 deletions src/sse_sorthelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}}}*/

#include <sse/vector.h>
#include <sse/macros.h>
#include <Vc/sse/vector.h>
#include <Vc/sse/macros.h>

namespace Vc_VERSIONED_NAMESPACE
{
Expand Down
2 changes: 1 addition & 1 deletion src/trigonometric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <Vc/vector.h>
#if defined(Vc_IMPL_SSE) || defined(Vc_IMPL_AVX)
#include <common/macros.h>
#include <Vc/common/macros.h>
//#include <Vc/IO>

namespace Vc_VERSIONED_NAMESPACE
Expand Down
10 changes: 5 additions & 5 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ macro(vc_add_test _name)
set(_target "${name}_scalar")
list(FIND disabled_targets ${_target} _disabled)
if(_disabled EQUAL -1 AND "${_targets}" MATCHES "Scalar")
file(GLOB _extra_deps "${CMAKE_SOURCE_DIR}/scalar/*.tcc" "${CMAKE_SOURCE_DIR}/scalar/*.h" "${CMAKE_SOURCE_DIR}/common/*.h")
file(GLOB _extra_deps "${CMAKE_SOURCE_DIR}/Vc/scalar/*.tcc" "${CMAKE_SOURCE_DIR}/Vc/scalar/*.h" "${CMAKE_SOURCE_DIR}/Vc/common/*.h")
add_file_dependencies(${_name}.cpp "${_extra_deps}")
add_executable(${_target} EXCLUDE_FROM_ALL ${_name}.cpp)
vc_set_test_target_properties(${_target} Scalar "${Vc_SCALAR_FLAGS}")
Expand All @@ -143,7 +143,7 @@ macro(vc_add_test _name)
set(_target "${name}_sse")
list(FIND disabled_targets ${_target} _disabled)
if(_disabled EQUAL -1)
file(GLOB _extra_deps "${CMAKE_SOURCE_DIR}/sse/*.tcc" "${CMAKE_SOURCE_DIR}/sse/*.h" "${CMAKE_SOURCE_DIR}/common/*.h")
file(GLOB _extra_deps "${CMAKE_SOURCE_DIR}/Vc/sse/*.tcc" "${CMAKE_SOURCE_DIR}/Vc/sse/*.h" "${CMAKE_SOURCE_DIR}/Vc/common/*.h")
add_file_dependencies(${_name}.cpp "${_extra_deps}")
add_executable(${_target} EXCLUDE_FROM_ALL ${_name}.cpp)
vc_set_test_target_properties(${_target} SSE "${Vc_SSE_FLAGS}")
Expand All @@ -154,7 +154,7 @@ macro(vc_add_test _name)
set(_target "${name}_avx")
list(FIND disabled_targets ${_target} _disabled)
if(_disabled EQUAL -1)
file(GLOB _extra_deps "${CMAKE_SOURCE_DIR}/avx/*.tcc" "${CMAKE_SOURCE_DIR}/avx/*.h" "${CMAKE_SOURCE_DIR}/common/*.h")
file(GLOB _extra_deps "${CMAKE_SOURCE_DIR}/Vc/avx/*.tcc" "${CMAKE_SOURCE_DIR}/Vc/avx/*.h" "${CMAKE_SOURCE_DIR}/Vc/common/*.h")
add_file_dependencies(${_name}.cpp "${_extra_deps}")
add_executable(${_target} EXCLUDE_FROM_ALL ${_name}.cpp)
vc_set_test_target_properties(${_target} AVX "${Vc_AVX_FLAGS}")
Expand All @@ -165,7 +165,7 @@ macro(vc_add_test _name)
set(_target "${name}_avx2")
list(FIND disabled_targets ${_target} _disabled)
if(_disabled EQUAL -1)
file(GLOB _extra_deps "${CMAKE_SOURCE_DIR}/avx/*.tcc" "${CMAKE_SOURCE_DIR}/avx/*.h" "${CMAKE_SOURCE_DIR}/common/*.h")
file(GLOB _extra_deps "${CMAKE_SOURCE_DIR}/Vc/avx/*.tcc" "${CMAKE_SOURCE_DIR}/Vc/avx/*.h" "${CMAKE_SOURCE_DIR}/Vc/common/*.h")
add_file_dependencies(${_name}.cpp "${_extra_deps}")
add_executable(${_target} EXCLUDE_FROM_ALL ${_name}.cpp)
vc_set_test_target_properties(${_target} AVX2 "${Vc_AVX2_FLAGS}")
Expand Down Expand Up @@ -264,7 +264,7 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "(x86_64|AMD64|amd64)")
COMMAND ${CMAKE_CXX_COMPILER}
${incdirs} ${_flags} -O1 -DVc_IMPL=${_impl} ${ARGN} -S -o ${asmfile}
${CMAKE_CURRENT_SOURCE_DIR}/abi.cpp
DEPENDS abi.cpp ${CMAKE_SOURCE_DIR}/*/*.h ${CMAKE_SOURCE_DIR}/*/*.tcc
DEPENDS abi.cpp ${CMAKE_SOURCE_DIR}/Vc/*/*.h ${CMAKE_SOURCE_DIR}/Vc/*/*.tcc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Build ABI test: ${asmfile}"
VERBATIM
Expand Down
4 changes: 2 additions & 2 deletions tests/arithmetics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <iostream>
#include <limits>
#include <Vc/limits>
#include <common/const.h>
#include <common/macros.h>
#include <../Vc/common/const.h>
#include <../Vc/common/macros.h>
#include <random>

using namespace Vc;
Expand Down
2 changes: 1 addition & 1 deletion tests/math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "vectormemoryhelper.h"
#include <cmath>
#include <algorithm>
#include <common/const.h>
#include <Vc/common/const.h>
/*}}}*/
using namespace Vc;

Expand Down
2 changes: 1 addition & 1 deletion tests/simdarray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}}}*/

#include "unittest.h"
#include "../common/simdarray.h"
#include <Vc/common/simdarray.h>

using namespace Vc;

Expand Down
2 changes: 1 addition & 1 deletion tests/sse_blend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}}}*/

#include "unittest.h"
#include <sse/intrinsics.h>
#include <Vc/sse/intrinsics.h>

TEST(blendpd)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/stlcontainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <list>
#include <deque>

#include "common/macros.h"
#include "../Vc/common/macros.h"

template<typename Vec> size_t alignmentMask()
{
Expand Down

0 comments on commit 5519ed0

Please sign in to comment.