image thumbnail

Parallel Particle Swarm Optimizer for CUDA/C Mex Models

version (13.6 KB) by Jordan


Updated 15 Jan 2016

View License

A GPU-parallelized particle swarm optimizer that runs from MATLAB. Particles are launched simultaneously from a CUDA/C mex file that is called from the provided MATLAB file. This Matlab/CUDA framework allows users to easily implement, optimize and visualize their CUDA/C models.
This framework's two components in more detail:

1) A GPU-parallelized particle swarm optimizer in Matlab that is based off a research-verified particle swarm variant (*). The optimizer also allows the user to test all different types of CUDA launch bounds straight from Matlab for easy profiling and meta optimization.
2) The CUDA/C mex file that interfaces the with Matlab. It contains a wrapper kernel with the cuRand random number generation and data reduction routines already in place. It also contains a main function with all the mex-specific-code and gpu error checking routines in place. This allows easy integration with the users' specific model and fast debugging.
Enjoy the visualization and comfort of Matlab while getting the speed of CUDA/C!
See the full description at
(*) Eberhart, R., Shi, Y.: Comparing inertia weights and constriction factors in particle swarm optimization. In: Proceedings of the 2000 IEEE Congress on Evolutionary Computation, Piscataway, NJ, IEEE Press (2000) 84–88

Cite As

Jordan (2021). Parallel Particle Swarm Optimizer for CUDA/C Mex Models (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!