this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

A test case for issue #40. Segfaults with: make -C test test_simd && ./test/test_simd

+28
+1
.gitignore
··· 44 44 tools/fft_int16_t 45 45 tools/fft_int32_t 46 46 tools/fft_simd 47 + test/test_simd
+2
test/Makefile
··· 64 64 tools: 65 65 cd ../tools && make all 66 66 67 + test_simd: test_simd.c $(SRCFILES) 68 + $(CC) -o $@ -g $(CFLAGS) -DUSE_SIMD=1 -msse $+ -lm 67 69 68 70 $(SELFTEST): $(SELFTESTSRC) $(SRCFILES) 69 71 $(CC) -o $@ $(CFLAGS) $(TYPEFLAGS) $+ -lm
+25
test/test_simd.c
··· 1 + #include <kiss_fftnd.h> 2 + 3 + static void test1(void) 4 + { 5 + int is_inverse = 1; 6 + int n[2] = {256,256}; 7 + size_t nbytes = sizeof(kiss_fft_cpx)*n[0]*n[1]; 8 + 9 + kiss_fft_cpx * inbuf = _mm_malloc(nbytes,16); 10 + kiss_fft_cpx * outbuf = _mm_malloc(nbytes,16); 11 + memset(inbuf,0,nbytes); 12 + memset(outbuf,0,nbytes); 13 + 14 + kiss_fftnd_cfg cfg = kiss_fftnd_alloc(n,2,is_inverse,0,0); 15 + kiss_fftnd(cfg,inbuf,outbuf); 16 + kiss_fft_free(cfg); 17 + _mm_free(inbuf); 18 + _mm_free(outbuf); 19 + } 20 + 21 + int main(void) 22 + { 23 + test1(); 24 + return 0; 25 + }