Effacer les filtres
Effacer les filtres

Convert .c files to mex on macOS

2 vues (au cours des 30 derniers jours)
Koren Murphy
Koren Murphy le 30 Nov 2020
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

Réponses (0)

Catégories

En savoir plus sur Application Deployment dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by