我想在mex文件中使用AVX指令并使用-mavx
进行编译这是一个非常简单的mex函数,错误发生在这里:
void mexFunction( int nlhs, mxArray *plhs[],
int nrhs, const mxArray *prhs[])
{
plhs[0] = mxCreateDoubleMatrix(1,1,mxREAL);
double * out = mxGetPr(plhs[0]);
*out = 3.0;
}
当我使用-m64 -O2编译它并使用
运行它时out = myFunction()
它运行正常,但如果我使用额外的-mavx标志编译它,当我尝试运行代码时matlab崩溃。
------------------------------------------------------------------------
(unknown signal) detected at Sat Jun 14 14:41:54 2014
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled
Default Encoding : windows-1252
MATLAB Architecture: win64
MATLAB Root : D:\Programme\MATLAB\R2013a
MATLAB Version : 8.1.0.604 (R2013a)
Operating System : Microsoft Windows 7
Processor ID : x86 Family 6 Model 37 Stepping 5, GenuineIntel
Virtual Machine : Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : Version 6.1 (Build 7601: Service Pack 1)
Fault Count: 1
Abnormal termination:
(unknown signal)
由于