Git Product home page Git Product logo

tsunami's Introduction

.NET GitHub GitHub issues Nuget Nuget

logo tsunami

A High Performance C# wrapper that allows you to get the benifts of SIMD Intrinsics on List<T>.

What does this do?

This library is a wrapper for System.Runtime.Intrensics and System.Numerics that allows you do get the performance benifits of SIMD instructions without having to worry about things like memory management, resizing inputs or dealing with the Vector type.

Current supported vector operations:

  • Add
  • Max
  • Min
  • Multiply
  • Subtract
  • AndNot
  • And
  • Or
  • Divide
  • Xor
  • SquareRoot

Benchmarks

Count Tsunami Normal Equal? % Diff
10000 3.9621 ms 0.4234 ms True 89.31374776002625
100000 0.2125 ms 0.3279 ms True 35.19365660262276
1000000 2.1131 ms 3.2197 ms True 34.369661769730094
10000000 28.6489 ms 34.0691 ms True 15.909431126739474
100000000 686.2303 ms 485.0529 ms True 29.316309699527988
250000000 1409.1429 ms 2354.5231 ms True 40.15166383375045

Code Example

var x = Enumerable.Range(0, size).ToList();  
var y = Enumerable.Range(0, size).ToList();  
var res = Tsunami<int>.DoOperations(x, y, Operations.Add);  

Please look at the "TsunamiTester" project for more information.

Supported Instruction Sets

  • Generic
  • AVX2
  • NEON
  • SSE3
  • SSE41
  • SSE42

License

MIT License

Copyright (c) 2023 Greg James

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

tsunami's People

Contributors

dependabot[bot] avatar gregyjames avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tsunami's Issues

Improve documentation

Currently the various instruction sets and types support different vector operations. The operations object should be split up for each specific instruction and type OR XMLDoc documentation should be provided for each of the functions/types.

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.