Borrar filtros
Borrar filtros

[Mex] How to compile file with Intel Intrinsics (SSE)?

3 visualizaciones (últimos 30 días)
Miguel Rodrigues
Miguel Rodrigues el 19 de Abr. de 2017
Respondida: Antoine el 19 de Abr. de 2017
I have a simple test.c file with Intel Intrinsics (SSE function calls). I can not compile using Mex within Matlab environment, but I can using gcc outside Matlab environment.
Outside Matlab, I use the following command: gcc test.c -o test -msse4
Inside Matlab, I try the following command: mex gcc test.c -o test -msse4 It fails with error "-msse4" is not a valid option.
If I try: mex gcc test.c -o test I get linking error, which is expected
How can I compile this file? Is it impossible?

Respuestas (1)

Antoine
Antoine el 19 de Abr. de 2017
Hello,
did you try "mex CC=gcc CFLAGS=-msse4 test.c"? I think it should work.

Categorías

Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by