Git Product home page Git Product logo

sseneoncompare's Introduction

A small SSE Neon comparison

This project is a small example comparison of 4-wide ray-bounding-box intersection implemented using two different scalar approaches, using SSE, and using Neon. The specific ray-bounding-box intersection algorithm implemented is adapted from "An Efficient and Robust Ray-Box Intersection Algorithm" by Amy Williams, Steve Barrus, Keith Morley, and Peter Shirley, 2005.

This project is an accompaniment to my blog post, "Comparing SIMD on x86-64 and arm64". For a thorough walkthrough of the code and explanation for what the code does, please see the blog post.

Dependencies

The arm64 build depends on sse2neon for the SSE implementation. sse2neon is included as a submodule; please clone using the following:

git clone --recursive

You will need a modern C++ compiler with support for C++17, and you will need a version of ispc with Neon support (v1.16.1 or newer).

To build, you will need CMake 3.19 or newer.

Build and Run

cmake . && make && ./sseneoncompare

The x86_64 build includes both scalar implementations and the SSE implementation. The arm64 build includes both scalar implementations, the SSE implementation (using sse2neon), and the Neon implementation.

When run, the program will run each ray-bounding-box intersection implementation 1000 times and report the total time taken.

Unfortunately, on macOS 11 and up, automatically building a Universal Binary with x86_64 and arm64 support does not work due to CMake's ispc support not working with Universal Binary support yet.

Licensing

Copyright (c) Yining Karl Li 2021. Licensed under Apache 2.0 (see LICENSE.txt for details).

sseneoncompare's People

Contributors

betajippity avatar volyrique avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.