Code Monkey home page Code Monkey logo

vecf32's Introduction

vecf32 GoDoc Build Status Coverage Status

Package vecf32 provides common functions and methods for slices of float64

Installation

go get -u github.com/chewxy/vecf32

Dependencies

This package math32. For testing this package uses testify/assert, which is licenced with a MIT/BSD-like licence

Build Tags

The point of this package is to provide operations that are accelerated by SIMD. However, this pakcage by default does not use SIMD. To use SIMD, build tags must be used. The supported build tags are sse and avx. Here's an example on how to use them:

  • SSE - `go build -tags='sse' ...
  • AVX - `go build -tags='avx' ...

FAQ

Why are there so many a = a[:len(a)] lines?

This is mainly done to eliminate bounds checking in a loop. The idea is the bounds of the slice is checked early on, and if need be, panics early. Then if everything is normal, there won't be bounds checking while in the loop.

To check for boundschecking and bounds check elimination (an amazing feature that landed in Go 1.7), compile your programs with -gcflags='-d=ssa/check_bce/debug=1'.

Contributing

Contributions are welcome. The typical process works like this:

  1. File an issue on the topic you want to contribute
  2. Fork this repo
  3. Add your contribution
  4. Make a pull request
  5. The pull request will be merged once tests pass, and code reviewed.

Pull Requests

This package is very well tested. Please ensure tests are written if any new features are added. If bugs are fixed, please add the bugs to the tests as well.

Licence

Package vecf32 is licenced under the MIT licence.

vecf32's People

Contributors

chewxy avatar

Watchers

 avatar  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.