3

Optimization Planning through Profiling

From profiling, we can find where our codes consume more running time and identify the bottlenecks in our codes. Since many big codes have multiple layers in practice, it is not straightforward to find functions that, in turn, call other time-consuming functions. And, we might encounter this situation several layers down in the codes. Through the profiling process, we can efficiently determine which codes are responsible for such calls. This is an essential step for optimization planning. In this chapter, we examine the MATLAB built-in profiler to find the bottlenecks in m-files; C/C++ profiling methods for c-mex codes; CUDA code profiling methods using Visual Studio and NVIDIA Visual Profiler; and ...

Get Accelerating MATLAB with GPU Computing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.