Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ if (HAS_FCOLOR_DIAGNOSTICS)
add_compile_options(-fcolor-diagnostics)
endif()

# compiler options for SIMD operations
if(MSVC)
add_compile_options(/arch:AVX2)
elseif(UNIX)
check_cxx_compiler_flag("-mavx2" HAS_MAVX2)
if(HAS_MAVX2)
add_compile_options(-mavx2)
endif()
endif()

if (UNIX)
add_compile_options(-W -Wall)
else()
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@ IGNORE_PREFIX =
# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
# The default value is: YES.

GENERATE_HTML = NO
GENERATE_HTML = YES

# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Change Log
Next release
------------

* SIMD operations: header ``simd_operations`` (contributed by Andrea Costamagna)
`#142 <https://github.com/msoeken/kitty/pull/142>`_

v0.8 (September 9, 2022)
------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Welcome to kitty's documentation!

truth_table_data_structures
bit_operations
simd_operations
algorithm
constructors
operations
Expand Down
20 changes: 20 additions & 0 deletions docs/simd_operations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Single Instruction Multiple Data Operations
===========================================

The header ``<kitty/simd_operations.hpp>`` implements bitwise operations
that are optimized through vectorization, if supported by the machine on
which the code is compiled. It is suggested to replace the traditional
operations with these alternatives for truth table with more than `1024`
bits. However, compiler dependent profiling is required to identify the
performance cutoff.

The header provides the following functions:

.. doc_brief_table::
simd::bitwise_and
simd::bitwise_or
simd::bitwise_xor
simd::bitwise_lt
simd::unary_not
simd::set_zero
simd::set_ones
1 change: 1 addition & 0 deletions include/kitty/kitty.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include "permutation.hpp"
#include "print.hpp"
#include "properties.hpp"
#include "simd_operations.hpp"
#include "spectral.hpp"
#include "spp.hpp"
#include "traits.hpp"
Expand Down
Loading
Loading