iMac Matlab Integer addition using dynamic library

Supports signed and unsigned 8,16,32,64bit integers with overflow.
11 Downloads
Updated 19 Apr 2023

View License

This project uses a dynamic librarys named to perform x64 integer register adds for 8,16,32,64bit integers with overflow.
These files were built on an iMac (Retina 5K, 27-inch, 2017) with Intel 64x (i5)
No support for M1 Macs or Windows. (as of yet)
Built using:
Xcode 14.2 (14c18). You will need to install Xcode 14.2
You will need Matlab 2017b.
You will need to download the shared libraries from my Github repository:
browdone1/db_git_imac_x64_integer_sum
NOTE: The shared library libdysum.dylib does not always work when down loaded from Github.
THEREFORE: I am including mex file versions of the shared library functions.
The mex files have been demonstrated to work when copied to your Matlab path.
IF USING dylib:
Copy libdysum.dylib (from Github) and *.m, *.h fies to your Matlab working directory.
Note: When downloading single text or m files from Github:
First select file, then when it opens select "raw".
Then when it opens again, right click and select save as.
To check for virus:
objdump -D -C libdysum.dylib
This lists code for each function, mainly a bunch of argument loads and with one "add" for each function.
IF USING MEX files:
Copy .m testdy*.m files to Matlab working directory.
Copy file in folder mex/*.* (mex files from Github) to your Matlab working path.
For example:
The testdySumInt16.m will demonstrate integer overflow issues with Matlab and demonstrate
how to make calls to shared libraries. All test files have a USE_MEX variable
that can be edited to select whether dylib or mex shared libraries are to be used.

Cite As

Donald Brown (2026). iMac Matlab Integer addition using dynamic library (https://uk.mathworks.com/matlabcentral/fileexchange/127888-imac-matlab-integer-addition-using-dynamic-library), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2017b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.2

Added mex files

1.0.1

Added additional mex files

1.0.0