Do Mathematical Operation Using vDSP Power(πŸ’ͺ)

MdNiks
2 min readMar 22, 2020

--

We are know everybody facing big problem in the world due to COVID-19. We are praying (πŸ™πŸ™πŸ™πŸ™πŸ™) to the GOD. All problems are settled down very fast. Stay Home( 🏠) and Safe yourself

Apple have introduced Accelerate Framework with different function (vDSP, vForce, vImage).

Overview Accelerate

Accelerate provides high-performance, energy-efficient computation on the CPU by leveraging its vector-processing capability.

Here We have discussed about vDSP Overview vDSP πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡ !!!!!

Overview

The vDSP framework contains have highly optimized functions for digital signal processing and general purpose arithmetic on large arrays.

In daily routine coding life, lot’s of arithmetic operations we have performed right ? So simple if we add two arrays value and multiply with n number so what we will do, Generally we do manually right ? Like that πŸ‘‡

Now how could we optimize this code? First, import the Accelerate framework:

import Accelerate

let’s perform same logic using vDSP version of the same operation runs significantly faster:

Wrapping Up

The following table summaries the basic arithmetic functions available in vDSP.

Just use it. w00t! How cool is that and all done with just
a few lines of code!

If you have any comments or questions, please respond below! I’d love to hear from you.

--

--

MdNiks

I'm an accomplished iOS programmer with more than 12 years of experience working in a collaborative environment with tight deadlines.