Giter Site home page Giter Site logo

kentaro / pelemay Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zeam-vm/pelemay

0.0 2.0 0.0 429 KB

Pelemay is a native compiler for Elixir, which generates SIMD instructions. It has a plan to generate for GPU code.

License: Apache License 2.0

Elixir 71.10% C 27.50% C++ 1.39%

pelemay's Introduction

Pelemay

Pelemay = The Penta (Five) “Elemental Way”: Freedom, Insight, Beauty, Efficiency and Robustness

For example, the following code of the function map_square will be compiled to native code using SIMD instructions by Pelemay.

defmodule M do
  require Pelemay
  import Pelemay

  defpelemay do
    def map_square (list) do
      list
      |> Enum.map(& &1 * &1)
    end

    def string_replace(list) do
      list
      |> Enum.map(& String.replace(&1, "Fizz", "Buzz"))
    end
  end
end

Supported Platforms

Potentially, Pelemay may support any architectures that both Erlang and Clang or GCC are supported.

We've tested it well on the following processor architectures:

  • x86_64
  • ARM

We've tested it well on the following OS:

  • macOS (64bit, including Apple Silicon M1 Mac on ARM native mode (unfortunately, not works on Rosetta 2))
  • Linux (64bit)
  • Nerves (Raspberry Pi 3)

I'm so sorry but Windows isn't be supported because of changing the builder of Pelemay.

We've tested it on the following Elixir versions:

  • 1.9
  • 1.11

We've tested it on the following OTP versions:

  • 23
  • 22
  • 21
  • 20

We've tested it on Clang 6 or later and GCC 7 or later. Potentially, Clang and GCC that supports auto-vectorization can generate native code with SIMD instructions by Pelemay.

Pelemay also supports Nerves.

Pre-installation

Pelemay requires Clang or GCC and make.

Environment Variable CC is recommended being set the path of the C compiler you want to use.

Installation

Add pelemay to your list of dependencies in mix.exs:

def deps do
  [
    {:pelemay, "~> 0.0.14"},
  ]
end

Documentation is generated with ExDoc and published on HexDocs. The docs will be found at https://hexdocs.pm/pelemay.

pelemay's People

Contributors

christianjgreen avatar connorrigby avatar fhunleth avatar hisaway avatar mobileoverlord avatar muramasa8191 avatar supersimple avatar zacky1972 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.