Giter Site home page Giter Site logo

jmert / unixmmap.jl Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 377 KB

A Julia package that exposes the Unix mmap interfaces

Home Page: https://jmert.github.io/UnixMmap.jl/

License: MIT License

Julia 100.00%
julia julialang mmap memory-mapping unix linux bsd apple madvise

unixmmap.jl's Introduction

UnixMmap

Documentation Build Status DOI

UnixMmap is an alternative to the Julia standard library's Mmap, with the purpose of exposing the Unix memory-mapping interface.

Installation and usage

Installation and loading is as easy as:

pkg> add UnixMmap

julia> using UnixMmap

A file can be memory mapped (read-only by default) by giving the filename and the Array type (optionally with dimensions to give a shape):

julia> UnixMmap.mmap("arbitrary.dat", Vector{Float64})
192-element Vector{Float64}:
 0.0
 0.0
 
 0.0
 0.0

julia> UnixMmap.mmap("arbitrary.dat", Matrix{Float64}, (64, 3))
64×3 Matrix{Float64}:
 0.0  0.0  0.0
 0.0  0.0  0.0
 
 0.0  0.0  0.0
 0.0  0.0  0.0

while an anonymous memory map can be created by instead specifying the Array type and dimensions:

julia> UnixMmap.mmap(Matrix{Float64}, (128, 3))
128×3 Matrix{Float64}:
 0.0  0.0  0.0
 0.0  0.0  0.0
 
 0.0  0.0  0.0
 0.0  0.0  0.0

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.