Convert .c files to mex on macOS

1 回表示 (過去 30 日間)
Koren Murphy
Koren Murphy 2020 年 11 月 30 日
I am trying to convert 6 files to the appropriate .mex file on a mac. The code has been done for windows and linux but I do not have access to either. I have gotten to elseif ismac and that is it. The last two are complied easily but the first four require the OpenMP - I have downloaded this and it is in the library. Is there any more downloads I need and how would the code look?
if ispc
% windows platform, MSVC compiler
mex COMPFLAGS="$COMPFLAGS /openmp" -largeArrayDims -v count_subsets.cpp
mex COMPFLAGS="$COMPFLAGS /openmp" -largeArrayDims -v is_subset.cpp
mex COMPFLAGS="$COMPFLAGS /openmp" -largeArrayDims -v adjacency_test_pattern_tree_C.cpp
mex COMPFLAGS="$COMPFLAGS /openmp" -largeArrayDims -v prune_candidates_rank_pattern_tree_C.cpp
mex calculate_fraction.c
mex flush_file_cache.cpp
elseif isunix
% unix platform, GCC compiler
mex CXXFLAGS="\$CXXFLAGS -fopenmp" LDFLAGS="\$LDFLAGS -fopenmp" -largeArrayDims -v count_subsets.cpp
mex CXXFLAGS="\$CXXFLAGS -fopenmp" LDFLAGS="\$LDFLAGS -fopenmp" -largeArrayDims -v is_subset.cpp
mex CXXFLAGS="\$CXXFLAGS -mpopcnt -fopenmp" LDFLAGS="\$LDFLAGS -mpopcnt -fopenmp" -largeArrayDims -v prune_candidates_rank_pattern_tree_C.cpp
mex CXXFLAGS="\$CXXFLAGS -fopenmp" LDFLAGS="\$LDFLAGS -fopenmp" -largeArrayDims -v adjacency_test_pattern_tree_C.cpp
mex calculate_fraction.c
mex flush_file_cache.cpp
elseif ismac
% mac platform

回答 (0 件)

カテゴリ

Help Center および File ExchangeApplication Deployment についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by