nodejs / node-addon-examples

Node.js C++ addon examples from http://nodejs.org/docs/latest/api/addons.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using NAPI with SIMD and pthreads

gandharva26 opened this issue · comments

I am trying to convert a C++ project that uses SIMD into a Node.js Library using NAPI
I need to compile a C++ project using this command
g++ -O3 -std=c++11 -mavx -mavx2 -msse -msse2 -msse4 -msse4.2 -mpclmul -o bin/example1 src/*.cpp example/example1.cpp -lpthread -mcmodel=medium -static-libstdc++

This has pthread and SIMD flags that need to be used, is there an example where SIMD and pthread flags have been used with a Node API project that I can look for? or can anyone help me how to go about it?