├── cmake └── Config.cmake.in ├── .gitignore ├── SECURITY.md ├── CMakeLists.txt ├── ReadMe.md ├── LICENSE ├── CONTRIBUTING.md └── CODE_OF_CONDUCT.md /cmake/Config.cmake.in: -------------------------------------------------------------------------------- 1 | include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #osx noise: 2 | .DS_Store 3 | 4 | # emacs noise 5 | *~ 6 | 7 | # Hunter/polly 8 | _logs/ 9 | _builds/ 10 | _install/ 11 | _framework/ 12 | _archives/ 13 | _bin/ 14 | 15 | *.hpp.orig 16 | *.h.orig 17 | *.cpp.orig 18 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation. 3 | 4 | ## Reporting a Vulnerability 5 | Please report any security vulnerabilities in this project utilizing the guidelines [here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html). 6 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Boilerplate: Copyright (C) 2014-2017 Ruslan Baratov 2 | # Modification: Copyright (C) 2017 David Hirvonen 3 | 4 | cmake_minimum_required(VERSION 3.5) 5 | project(NEON_2_SSE VERSION 1.0.0 LANGUAGES C) 6 | 7 | add_library(${PROJECT_NAME} INTERFACE) 8 | 9 | target_include_directories(${PROJECT_NAME} 10 | INTERFACE 11 | "$" 12 | ) 13 | 14 | ### Install ### 15 | set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") 16 | 17 | set(config_install_dir "lib/cmake/${PROJECT_NAME}") 18 | set(include_install_dir "include") 19 | 20 | set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake") 21 | set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") 22 | set(targets_export_name "${PROJECT_NAME}Targets") 23 | set(namespace "${PROJECT_NAME}::") 24 | 25 | include(CMakePackageConfigHelpers) 26 | write_basic_package_version_file( 27 | "${version_config}" COMPATIBILITY SameMajorVersion 28 | ) 29 | 30 | # Note: use 'targets_export_name' 31 | configure_file("cmake/Config.cmake.in" "${project_config}" @ONLY) 32 | 33 | install( 34 | TARGETS ${PROJECT_NAME} 35 | EXPORT "${targets_export_name}" 36 | INCLUDES DESTINATION "${include_install_dir}" 37 | ) 38 | 39 | install( 40 | FILES NEON_2_SSE.h 41 | DESTINATION "${include_install_dir}" 42 | ) 43 | 44 | install( 45 | FILES "${project_config}" "${version_config}" 46 | DESTINATION "${config_install_dir}" 47 | ) 48 | 49 | install( 50 | EXPORT "${targets_export_name}" 51 | NAMESPACE "${namespace}" 52 | DESTINATION "${config_install_dir}" 53 | ) 54 | -------------------------------------------------------------------------------- /ReadMe.md: -------------------------------------------------------------------------------- 1 | ***************************************************************************************** 2 | The NEON_2_SSE.h file is intended to simplify ARM->IA32 porting. 3 | It makes the correspondence (or a real porting) of ARM NEON intrinsics as defined in "arm_neon.h" header 4 | and x86 SIMD (up to AVX2) intrinsic functions as defined in corresponding x86 compilers headers files. 5 | **************************************************************************************** 6 | 7 | To take advantage of this file just include it in your project that uses ARM NEON intinsics instead of "arm_neon.h", compile it as usual and enjoy the result. 8 | 9 | Considering 64-128 bit width of the NEON istructions AVX vector instructions usage in x86 implementaion is litited, SSE is used in more than 90% of functions. 10 | However for some functions significant performance improvement it is recommended to compile your x86 code with the highest level of vector instructions supported by the target CPU -say SSE4 or AVX2. 11 | Please notice that AVX2 enabling for this project compilation includes FMA instructions as well. 12 | Just use the corresponding compiler flags for the purpose. In some cases you might need to define USE_SSE4 or USE_AVX2 in your project settings manually. Otherwise by default SIMD up to SSSE3 to be used. 13 | 14 | If NEON2SSE_DISABLE_PERFORMANCE_WARNING macro is defined, then the performance warnings for serial functions implementaions are disabled. 15 | 16 | For more information and license please read the NEON_2_SSE.h content. 17 | 18 | The unit tests set used for ARM NEON - x86 SSE conformance verification is https://github.com/christophe-lyon/arm-neon-tests 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | created by Victoria Zhislina, the Senior Application Engineer, Intel Corporation, victoria.zhislina@intel.com 2 | 3 | *** Copyright (C) 2012-2020 Intel Corporation. All rights reserved. 4 | 5 | IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 6 | 7 | By downloading, copying, installing or using the software you agree to this license. 8 | If you do not agree to this license, do not download, install, copy or use the software. 9 | 10 | License Agreement 11 | Redistribution and use in source and binary forms, with or without modification, 12 | are permitted provided that the following conditions are met: 13 | 14 | * Redistributions of source code must retain the above copyright notice, 15 | this list of conditions and the following disclaimer. 16 | 17 | * The name of the copyright holders may not be used to endorse or promote products 18 | derived from this software without specific prior written permission. 19 | 20 | This software is provided by the copyright holders and contributors "as is" and 21 | any express or implied warranties, including, but not limited to, the implied 22 | warranties of merchantability and fitness for a particular purpose are disclaimed. 23 | In no event shall the Intel Corporation or contributors be liable for any direct, 24 | indirect, incidental, special, exemplary, or consequential damages 25 | (including, but not limited to, procurement of substitute goods or services; 26 | loss of use, data, or profits; or business interruption) however caused 27 | and on any theory of liability, whether in contract, strict liability, 28 | or tort (including negligence or otherwise) arising in any way out of 29 | the use of this software, even if advised of the possibility of such damage. 30 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ### License 4 | 5 | is licensed under the terms in [LICENSE]. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms. 6 | 7 | ### Sign your work 8 | 9 | Please use the sign-off line at the end of the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify 10 | the below (from [developercertificate.org](http://developercertificate.org/)): 11 | 12 | ``` 13 | Developer Certificate of Origin 14 | Version 1.1 15 | 16 | Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 17 | 660 York Street, Suite 102, 18 | San Francisco, CA 94110 USA 19 | 20 | Everyone is permitted to copy and distribute verbatim copies of this 21 | license document, but changing it is not allowed. 22 | 23 | Developer's Certificate of Origin 1.1 24 | 25 | By making a contribution to this project, I certify that: 26 | 27 | (a) The contribution was created in whole or in part by me and I 28 | have the right to submit it under the open source license 29 | indicated in the file; or 30 | 31 | (b) The contribution is based upon previous work that, to the best 32 | of my knowledge, is covered under an appropriate open source 33 | license and I have the right under that license to submit that 34 | work with modifications, whether created in whole or in part 35 | by me, under the same open source license (unless I am 36 | permitted to submit under a different license), as indicated 37 | in the file; or 38 | 39 | (c) The contribution was provided directly to me by some other 40 | person who certified (a), (b) or (c) and I have not modified 41 | it. 42 | 43 | (d) I understand and agree that this project and the contribution 44 | are public and that a record of the contribution (including all 45 | personal information I submit with it, including my sign-off) is 46 | maintained indefinitely and may be redistributed consistent with 47 | this project or the open source license(s) involved. 48 | ``` 49 | 50 | Then you just add a line to every git commit message: 51 | 52 | Signed-off-by: Joe Smith 53 | 54 | Use your real name (sorry, no pseudonyms or anonymous contributions.) 55 | 56 | If you set your `user.name` and `user.email` git configs, you can sign your 57 | commit automatically with `git commit -s`. 58 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, caste, color, religion, or sexual 10 | identity and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the overall 26 | community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or advances of 31 | any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email address, 35 | without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | CommunityCodeOfConduct AT intel DOT com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series of 86 | actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or permanent 93 | ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within the 113 | community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.1, available at 119 | [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. 120 | 121 | Community Impact Guidelines were inspired by 122 | [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. 123 | 124 | For answers to common questions about this code of conduct, see the FAQ at 125 | [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at 126 | [https://www.contributor-covenant.org/translations][translations]. 127 | 128 | [homepage]: https://www.contributor-covenant.org 129 | [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html 130 | [Mozilla CoC]: https://github.com/mozilla/diversity 131 | [FAQ]: https://www.contributor-covenant.org/faq 132 | --------------------------------------------------------------------------------