A simple REST module that performs sparse matrix multiplication through WebCL/WebGL for the LAR/LAR.js project
- node-webcl (patched version)
- express
- gzippo
- winston (logging)
- mocha, should (testing)
- Clone this repository
- Enter the repository directory
npm install
ORCPLUS_INCLUDE_PATH=$OPENCL_INCLUDE_DIR npm install
Note that if you incur in some problems, they might be related to the module requires "node-webcl": you need to install also its own dependencies that don't get installed automatically (read here)
Start server with npm run-script run
(with default arguments)
OR
Start server with ./startREST.sh
(*NIX flavour) or node RESTMultiply.js
. Possible arguments:
- --no-webcl (disable WebCL backend) Default: false
- --cluster (enable cluster). Default: false
- --port=1234 (use port 1234 to serve request). Default: 3000
- --key=dln (use string "dln" as api key for this instance).
The REST endpoint is (with a proper HTTP POST)
or
The latter has the effect of using a OpenCL kernel that performs CSR*CSR = COO. (Untested)
(The MIT License)
Copyright (c) 2013 Francesco Furiani
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.