Skip to content

friendlymatthew/gpujson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpujson

JSON parsing on a general purpose GPU

This project parses JSON entirely on the GPU via wgpu compute shaders. The parser decomposes JSON parsing into a pipeline of parallel prefix scans, producing a flat tape of structural characters

This is purely for research into reducing JSON parsing into what Raph Levien calls invitingly parallel problems

Usage

let json = r#"
{
    "foo": "bar",
    "baz": {
        "wef": [1, 2, 3],
        "yearn": {
            "1": 2,
            "2": 3.0 
        } 
    } 
}
"#;

let parser = Parser::try_new()?;
let tape = parser.parse_str(&json)?;

let document = Document::new(json.as_bytes(), &tape);

dbg!(document);

Reading

https://raphlinus.github.io/gpu/2020/09/05/stack-monoid.html
https://raphlinus.github.io/personal/2018/05/10/toward-gpu-json-parsing.html

About

general purpose GPU JSON parsing

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors