Skip to content

Commit

Permalink
Add OpenMP usage
Browse files Browse the repository at this point in the history
  • Loading branch information
SashaMN committed Dec 5, 2018
1 parent b85dda6 commit 7ec7072
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/compile.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

gcc -DTRAINING=1 -Wall -W -O3 -g -I../include denoise.c kiss_fft.c pitch.c celt_lpc.c -o dump_data -lm
gcc -o test_lpcnet -mavx2 -mfma -g -O3 -Wall -W -Wextra lpcnet.c nnet.c nnet_data.c -lm
gcc -fopenmp -o test_lpcnet -mavx2 -mfma -g -O3 -Wall -W -Wextra lpcnet.c nnet.c nnet_data.c -lm
3 changes: 3 additions & 0 deletions src/lpcnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "common.h"
#include "arch.h"
#include "lpcnet.h"
#include "omp.h"

#define NB_FEATURES 38
#define NB_TOTAL_FEATURES 55
Expand Down Expand Up @@ -166,6 +167,7 @@ void lpcnet_synthesize(LPCNetState *lpcnet, short *output, const float *features
RNN_CLEAR(output, N);
return;
}
#pragma omp parallel for
for (i=start;i<N;i++)
{
int j;
Expand Down Expand Up @@ -195,6 +197,7 @@ void lpcnet_synthesize(LPCNetState *lpcnet, short *output, const float *features
int main(int argc, char **argv) {
FILE *fin, *fout;
LPCNetState *net;

net = lpcnet_create();
if (argc != 3)
{
Expand Down

0 comments on commit 7ec7072

Please sign in to comment.