Skip to content

athas/vector

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Static vectors for Futhark CI Documentation

A Futhark library for efficient statically-sized vectors. This is useful when working with many small vectors that do not need to be individually stored in memory.

Installation

$ futhark pkg add github.com/athas/vector
$ futhark pkg sync

Usage example

import "lib/github.com/athas/vector/vector"
module vector_2 = cat_vector vector_1 vector_1
module vector_3 = cat_vector vector_2 vector_1
module vector_5 = cat_vector vector_2 vector_3
module vector_8 = cat_vector vector_5 vector_3

def main (xs: [vector_8.length]i32) =
  xs
  |> vector_8.from_array
  |> vector_8.map (+1)
  |> vector_8.to_array

About

Futhark vectors with statically known size

Resources

Stars

Watchers

Forks

Packages

No packages published