function result = convolve(image, kernel)
numKernels = single(size(kernel, 3));
numSamples = single(size(image, 3));
mapSize = single(size(image,1) - size(kernel,1) + 1);
result = single(zeros(mapSize, mapSize, numKernels*numSamples));
for i=1:numKernels
result(:,:,((i-1)*numSamples +1):i*numSamples) = single(convn(image, kernel(:,:,i), 'valid'));
end
end
[1/11] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" convolve_terminate.cu -o build\win64\convolve_terminate.obj
FAILED: build/win64/convolve_terminate.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" convolve_terminate.cu -o build\win64\convolve_terminate.obj
CreateProcess failed: The system cannot find the file specified.
[2/11] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" convolve.cu -o build\win64\convolve.obj
FAILED: build/win64/convolve.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" convolve.cu -o build\win64\convolve.obj
CreateProcess failed: The system cannot find the file specified.
[3/11] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" convolve_initialize.cu -o build\win64\convolve_initialize.obj
FAILED: build/win64/convolve_initialize.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" convolve_initialize.cu -o build\win64\convolve_initialize.obj
CreateProcess failed: The system cannot find the file specified.
[4/11] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" MWCUBLASUtils.cpp -o build\win64\MWCUBLASUtils.obj
FAILED: build/win64/MWCUBLASUtils.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" MWCUBLASUtils.cpp -o build\win64\MWCUBLASUtils.obj
CreateProcess failed: The system cannot find the file specified.
[5/11] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" convolve_data.cu -o build\win64\convolve_data.obj
FAILED: build/win64/convolve_data.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" convolve_data.cu -o build\win64\convolve_data.obj
CreateProcess failed: The system cannot find the file specified.
[6/11] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" rt_nonfinite.cu -o build\win64\rt_nonfinite.obj
FAILED: build/win64/rt_nonfinite.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" rt_nonfinite.cu -o build\win64\rt_nonfinite.obj
CreateProcess failed: The system cannot find the file specified.
[7/11] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" cpp_mexapi_version.cpp -o build\win64\cpp_mexapi_version.obj
FAILED: build/win64/cpp_mexapi_version.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" cpp_mexapi_version.cpp -o build\win64\cpp_mexapi_version.obj
CreateProcess failed: The system cannot find the file specified.
[8/11] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" interface\_coder_convolve_mex.cu -o build\win64\_coder_convolve_mex.obj
FAILED: build/win64/_coder_convolve_mex.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" interface\_coder_convolve_mex.cu -o build\win64\_coder_convolve_mex.obj
CreateProcess failed: The system cannot find the file specified.
[9/11] nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" interface\_coder_convolve_api.cu -o build\win64\_coder_convolve_api.obj
FAILED: build/win64/_coder_convolve_api.obj
nvcc -c -rdc=true -Wno-deprecated-gpu-targets -Xcompiler "/wd 4819" -Xcompiler "/MD" -Xcudafe "--display_error_number --diag_suppress=2381 --diag_suppress=unsigned_compare_with_zero --diag_suppress=useless_type_qualifier_on_return_type" -D_GNU_SOURCE -DMATLAB_MEX_FILE -Xcompiler "/source-charset:utf-8" -I "." -I "C:\Users\Alex\Google Drive\Desktop\Active\AI\Neural-Net\tests" -I ".\interface" -I "C:\Workspace\MATLAB\extern\include" -I "." -DMW_CUDA_ARCH=350 -DMODEL=convolve_mex -DMW_NEEDS_VERSION_H -arch sm_35 -I "C:\Workspace\MATLAB/simulink/include" -I "C:\Workspace\MATLAB/toolbox/shared/simtargets" interface\_coder_convolve_api.cu -o build\win64\_coder_convolve_api.obj
CreateProcess failed: The system cannot find the file specified.
ninja: fatal: ReadFile: The handle is invalid.