sleef icon indicating copy to clipboard operation
sleef copied to clipboard

Build iutadvsimd with the same source files as iut*

Open diaena opened this issue 9 years ago • 6 comments

We currently need a special case for building the ADVSIMD test executable. This is something that needs fixing.

diaena avatar Aug 17 '17 12:08 diaena

I think you don't need to modify the C source code.

shibatch avatar Aug 17 '17 13:08 shibatch

What I know is that the compilation fails without the single and double precision source files for simd code. I didn't look very closely into it, but followed what the current build system does and did the same with cmake.

diaena avatar Aug 17 '17 13:08 diaena

I modified the corresponding part of the original makefile as follows, and it compiles.

iutadvsimd : ../../lib/libsleef.$(DLLSUFFIX) ../../include/sleef.h iutsimdmain.o iutsimd.c testerutil.c ../libm/renameadvsimd.h ../../include/sleef.h
        $(CC) $(CFLAGS) -DENABLE_ADVSIMD $(ADVSIMDFLAG) iutsimdmain.o iutsimd.c testerutil.c -o iutadvsimd -lsleef -lm $(LIB)

../libm/renameadvsimd.h :
        +"$(MAKE)" --directory=../libm renameadvsimd.h

I will check your CMakeLists.txt tomorrow.

shibatch avatar Aug 17 '17 15:08 shibatch

You have to modify iutsimd.c in the following way.

#ifdef ENABLE_ADVSIMD
#define CONFIG 1
#include "helperadvsimd.h"
#include "renameadvsimd.h"
typedef Sleef_float64x2_t_2 vdouble2;
typedef Sleef_float32x4_t_2 vfloat2;
#endif

shibatch avatar Aug 18 '17 06:08 shibatch

I will submit a pull request with this change once the refactoring one gets merged in as I've based all my changed on the refactored code.

diaena avatar Aug 18 '17 11:08 diaena

Merged in https://github.com/shibatch/sleef/pull/58

fpetrogalli avatar Sep 01 '17 15:09 fpetrogalli