Trinity-SpaceData / conjunction /nasa_cara /DistributedMatlab /Utils /AugmentedMath /hasParallelToolbox.m
Download conjunction/nasa_cara/DistributedMatlab/Utils/AugmentedMath/hasParallelToolbox.m from STAR-future/Trinity-SpaceData: direct link, hf CLI and curl.
- Browser
- Download file 778 Bytes
-
https://huggingface.co/datasets/STAR-future/Trinity-SpaceData/resolve/main/conjunction/nasa_cara/DistributedMatlab/Utils/AugmentedMath/hasParallelToolbox.m
- Command line
-
hf download hf://datasets/STAR-future/Trinity-SpaceData/conjunction/nasa_cara/DistributedMatlab/Utils/AugmentedMath/hasParallelToolbox.m
-
curl -L -o hasParallelToolbox.m https://huggingface.co/datasets/STAR-future/Trinity-SpaceData/resolve/main/conjunction/nasa_cara/DistributedMatlab/Utils/AugmentedMath/hasParallelToolbox.m
778 Bytes
| function reply = hasParallelToolbox(S) | |
| % Get availability of the Parallel Processing Toolbox: | |
| % R = hasParallelToolbox() | |
| % Disable the flag for an existing PPT manually: | |
| % hasParallelToolbox(false) | |
| % Re-enable the actual status: | |
| % hasParallelToolbox(true) % Considers a missing toolbox also | |
| % Set Variables as persistent (reduced overhead) | |
| persistent hasPPT usePPT | |
| if isempty(hasPPT) | |
| % Initialize variables | |
| hasPPT = false; | |
| usePPT = false; | |
| % Get Version Information | |
| VersionInfo = ver; | |
| for i=1:length(VersionInfo) | |
| if strcmpi(VersionInfo(i).Name,'Parallel Computing Toolbox') | |
| hasPPT = true; | |
| end | |
| end | |
| usePPT = hasPPT; | |
| end | |
| if nargin > 0 | |
| usePPT = (any(S)) && hasPPT; | |
| end | |
| reply = usePPT; | |
| end |