/ocaml_gpu_wordcount

OCaml - Futhark - Example

Primary LanguageC

Ocaml - GPU wordcount example

A simple wordcount example using Futhark and OCaml

OCaml-GPU wordcount(using OpenCL)

futhark opencl --library libwc.fut -o libwc-opencl
gcc -c libwc-opencl.c -fPIC -o libwc-opencl.o -std=c99 -O3 -lm -lOpenCL -DOPENCL
gcc -shared libwc-opencl.o -o libwc-opencl.so
ar crs libwc-opencl.a libwc-opencl.o
Execution time: 0.021772s           
350387964
59167531
6936678

Ocaml-C wordcount

arul@arul-Serval-WS ~/d/ocaml_gpu_wordcount (main)> dune exec ./bin/main.exe
futhark c --library libwc.fut -o libwc-c
gcc -c libwc-c.c -fPIC -o libwc-c.o -std=c99 -O3 -lm
gcc -shared libwc-c.o -o libwc-c.so
ar crs libwc-c.a libwc-c.o
Execution time: 2.701808s           
350387964
59167531
6936678