Questions tagged [accelerate-framework]

The Accelerate.framework is a set of high-performance numerical libraries provided by Apple for iOS and MacOS It provides APIs for signal and image processing, linear algebra, and mathematical operations on vector data. Use this tag for questions relating to the use of the Accelerate framework.

Accelerate is a software framework provided by Apple that offers tools for large-scale mathematical computations and image calculations, optimized for high performance and low-energy consumption.


Information from Apple

Accelerate provides high-performance, energy-efficient computation on the CPU by leveraging its vector-processing capability. The following Accelerate libraries abstract that capability so that code written for them executes appropriate instructions for the processor available at runtime:

  • vImage. A wide range of image-processing functions, including Core Graphics and Core Video interoperation, format conversion, and image manipulation.
  • vDSP. Digital signal processing functions, including 1D and 2D fast Fourier transforms, biquadratic filtering, vector and matrix arithmetic, convolution, and type conversion.
  • vForce. Functions for performing arithmetic and transcendental functions on vectors.
  • Sparse Solvers, BLAS, and LAPACK. Libraries for performing linear algebra on sparse and dense matrices.
  • BNNS. Subroutines for constructing and running neural networks.

More information is available in the Accelerate documentation from Apple.

309 questions
73
votes
3 answers

Using the Apple FFT and Accelerate Framework

Has anybody used the Apple FFT for an iPhone app yet or know where I might find a sample application as to how to use it? I know that Apple has some sample code posted, but I'm not really sure how to implement it into an actual project.
Ian Oswald
  • 1,365
  • 3
  • 16
  • 27
13
votes
2 answers

Spectrogram from AVAudioPCMBuffer using Accelerate framework in Swift

I'm trying to generate a spectrogram from an AVAudioPCMBuffer in Swift. I install a tap on an AVAudioMixerNode and receive a callback with the audio buffer. I'd like to convert the signal in the buffer to a [Float:Float] dictionary where the key…
Jakub
  • 603
  • 7
  • 18
12
votes
1 answer

Can someone explain how this code converts volume to decibels using the Accelerate Framework?

I'm building an iOS app using EZAudio. It's delegate returns back a float** buffer, which contains float values indicating the volume detected. This delegate is called constantly and it's work is done a different thread. What I am trying to do is…
Jamie
  • 927
  • 1
  • 7
  • 18
12
votes
1 answer

performance of NumPy with different BLAS implementations

I'm running an algorithm that is implemented in Python and uses NumPy. The most computationally expensive part of the algorithm involves solving a set of linear systems (i.e. a call to numpy.linalg.solve(). I came up with this small…
lum
  • 1,503
  • 12
  • 17
10
votes
4 answers

Linear algebra on iPhone (python/numpy?)

This semester, I'm implementing a compressed-sensing algorithm as an iPhone app. To do this, I'll need some good matrix/linear algebra libraries. I'm a little new to both iOS and Python, and am looking for some help at evaluating my options. I know…
Scott
  • 2,568
  • 1
  • 27
  • 39
10
votes
6 answers

How to implement fast image filters on iOS platform

I am working on iOS application where user can apply a certain set of photo filters. Each filter is basically set of Photoshop actions with a specific parameters. This actions are: Levels adjustment Brightness / Contrast Hue / Saturation Single and…
9
votes
2 answers

How to cast UnsafeMutableRawPointer! to UnsafeMutablePointer in Swift 3.0 or newer?

I am working with Accelerate library for my iOS app. I built this app in Swift 2.0 a couple years ago and it was working fine. Now that Swift is updated to 3.0 and 4.0, I have to convert most of the code to the current syntax. I have run the…
8
votes
4 answers

FFT on iPhone to ignore background noise and find lower pitches

I have implemented Demetri's Pitch Detector project for the iPhone and hitting up against two problems. 1) any sort of background noise sends the frequency reading bananas and 2) lower frequency sounds aren't being pitched correctly. I tried to tune…
8
votes
5 answers

iPhone Image Processing with Accelerate Framework and vDSP

UPDATE: Please see additional question below with more code; I am trying to code a category for blurring an image. My starting point is Jeff LaMarche's sample here. Whilst this (after the fixes suggested by others) works fine, it is an order of…
Roger
  • 15,793
  • 4
  • 51
  • 73
8
votes
3 answers

Linear regression - accelerate framework in Swift

My first question here at Stackoverflow... hope my question is specific enough. I have an array in Swift with measurements at certain dates. Like: var myArray:[(day: Int, mW: Double)] = [] myArray.append(day:0, mW: 31.98) myArray.append(day:1, mW:…
arakweker
  • 1,535
  • 4
  • 18
  • 40
8
votes
1 answer

What replaces the iOS 5 deprecated accelerometer:didAccelerate?

Hmmm ... I am behind the times and trying to port over some old code to a new application and the accelerator delegation is deprecated. There must be a replacement. Please point me to the docs and get me jump started.
mobibob
  • 8,670
  • 20
  • 82
  • 131
8
votes
2 answers

Fastest YUV420P to RGBA conversion on iOS using the CPU

Can anyone recommend a really fast API, ideally NEON-optimized for doing YUV to RGB conversion at runtime on the iPhone using the CPU? The accelerate framework's vImage doesn't provide anything suitable, sadly, and using vDSP, converting to floats…
Alex Ferrier
  • 389
  • 4
  • 14
8
votes
3 answers

iPhone Accelerate Framework FFT vs Matlab FFT

I do not have much math background but part of the project I am working on requires the FFT of a single vector. The matlab function fft(x) works accurately for what I need, but after trying to set up the Accelerate Framework fft functions I get…
MrHappyAsthma
  • 6,332
  • 9
  • 48
  • 78
8
votes
3 answers

De-interleave and interleave buffer with vDSP_ctoz() and vDSP_ztoz()?

How do I de-interleave the float *newAudio into float *channel1 and float* channel2 and interleave it back into newAudio? Novocaine *audioManager = [Novocaine audioManager]; __block float *channel1; __block float *channel2; [audioManager…
sougonde
  • 3,438
  • 3
  • 26
  • 35
7
votes
2 answers

Accelerate framework uses only one core on Mac M1

The following C program (dgesv_ex.c) #include #include /* DGESV prototype */ extern void dgesv( int* n, int* nrhs, double* a, int* lda, int* ipiv, double* b, int* ldb, int* info ); /* Main program */ int main()…
Stéphane Mottelet
  • 2,853
  • 1
  • 9
  • 26
1
2 3
20 21