Skip to content

Commit

Permalink
Merge branch 'master' into Introducing_new_wasm_based_instruction_set
Browse files Browse the repository at this point in the history
  • Loading branch information
anutosh491 authored Oct 9, 2023
2 parents 83e57d2 + b0668e4 commit 1d3fb4a
Show file tree
Hide file tree
Showing 16 changed files with 236 additions and 193 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/clang-format-action@v4.2.0
uses: jidicula/clang-format-action@v4.11.0
with:
clang-format-version: '13'
clang-format-version: '16'
exclude-regex: 'doctest.h'
inlining-check:
runs-on: ubuntu-latest
Expand Down
9 changes: 3 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,16 @@ target_include_directories(xsimd INTERFACE
$<BUILD_INTERFACE:${XSIMD_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>)

if (ENABLE_XTL_COMPLEX)
target_compile_features(xsimd INTERFACE cxx_std_14)
else()
target_compile_features(xsimd INTERFACE cxx_std_11)
endif()

OPTION(ENABLE_XTL_COMPLEX "enables support for xcomplex defined in xtl" OFF)
OPTION(BUILD_TESTS "xsimd test suite" OFF)

if(ENABLE_XTL_COMPLEX)
find_package(xtl 0.7.0 REQUIRED)
target_compile_features(xsimd INTERFACE cxx_std_14)
target_compile_definitions(xsimd INTERFACE XSIMD_ENABLE_XTL_COMPLEX=1)
target_link_libraries(xsimd INTERFACE xtl)
else()
target_compile_features(xsimd INTERFACE cxx_std_11)
endif()

if(BUILD_TESTS)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/api/arch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Architecture manipulation
=========================

xsimd provides an high level description of the instruction sets it manipulates.
The mentionned types are primarily used as template parameters for :ref:`batch
The mentioned types are primarily used as template parameters for :ref:`batch
<xsimd-batch-ref>`, and when interacting with :cpp:func:`xsimd::dispatch()`.

The best available architecture is available at compile time through
Expand Down
2 changes: 1 addition & 1 deletion docs/source/vectorized_code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Assume that we have a simple function that computes the mean of two vectors, som

.. literalinclude:: ../../test/doc/writing_vectorized_code.cpp

How can we used `xsimd` to take advantage of vectorization?
How can we use `xsimd` to take advantage of vectorization?

Explicit use of an instruction set
----------------------------------
Expand Down
3 changes: 1 addition & 2 deletions examples/mandelbrot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,7 @@ struct run_archlist<xsimd::arch_list<Arch...>>
int maxIters,
std::vector<int, xsimd::aligned_allocator<int, Align>>& buffer)
{
using expand_type = int[];
expand_type { (run_arch<Arch>(bencher, x0, y0, x1, x1, width, height, maxIters, buffer), 0)... };
(void)std::initializer_list<int> { (run_arch<Arch>(bencher, x0, y0, x1, x1, width, height, maxIters, buffer), 0)... };
}
};

Expand Down
4 changes: 4 additions & 0 deletions include/xsimd/arch/generic/xsimd_generic_math.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -974,8 +974,12 @@ namespace xsimd
template <class A, class T>
inline batch<std::complex<T>, A> polar(const batch<T, A>& r, const batch<T, A>& theta, requires_arch<generic>) noexcept
{
#ifndef EMSCRIPTEN
auto sincosTheta = sincos(theta);
return { r * sincosTheta.second, r * sincosTheta.first };
#else
return { r * cos(theta), r * sin(theta) };
#endif
}

// fdim
Expand Down
2 changes: 1 addition & 1 deletion include/xsimd/math/xsimd_rem_pio2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace xsimd
#define XSIMD_LITTLE_ENDIAN
#endif
#elif defined(_WIN32)
// We can safely assume that Windows is always little endian
// We can safely assume that Windows is always little endian
#define XSIMD_LITTLE_ENDIAN
#elif defined(i386) || defined(i486) || defined(intel) || defined(x86) || defined(i86pc) || defined(__alpha) || defined(__osf__)
#define XSIMD_LITTLE_ENDIAN
Expand Down
Loading

0 comments on commit 1d3fb4a

Please sign in to comment.