Code Monkey home page Code Monkey logo

simdwrapper's Introduction

SIMDWrapper SIMDWrapper

SIMDWrapper is a C++17 header only library for AVX/AVX2/FMA ASIMD(NEON) .

Usage

  • code
#include <SIMDWrapper.hpp>
#include <iostream>
int main() {
	using namespace SIMDWrapper;
	std::cout << "AVX :" << std::boolalpha << Instruction::AVX() << "\n"
		<< "AVX2:" << Instruction::AVX2() << "\n"
		<< "FMA :" << Instruction::FMA() << std::endl;
	
	vector256<double> d1(3.14, -3.14, 1.73, 1.41);
	vector256<double> d2(8.10, 1.91, 3.30, - 3.33);
	
	vector256<float> f1 = d1.concat(d2.abs()*2);
	vector256<int32_t> source(0, 1, 2, 3, 4, 5, 6, 7);
	
	auto f_source = static_cast<vector256<float>>(source);
	
	std::cout << function::cmp_blend(f1 > f_source, f_source, f1+3) << std::endl;
	
	return 0;
}
  • result
AVX :true
AVX2:true
FMA :true
[0 -0.14 4.73 4.41 4 6.82 6 9.66]

Documents

https://akisute514.github.io/SIMDWrapper/

License

This software is released under the MIT License, see LICENSE.

simdwrapper's People

Contributors

akisute514 avatar murakamishun avatar

Watchers

 avatar

simdwrapper's Issues

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.