Question

I am trying to include vImage based functionality in my code. But compile fails - it doesnt even seem to recognize the functions/variables at all.

But at the same time vDSP based code seems to work fine. Also, the code compiles in simulator but fails in the device.

A sample code (which fails) is as follows

#import "test.h"
#include <Accelerate/Accelerate.h>

@implementation test 

-(void) test1{
  DSPComplex d ={1.0, 2.0};
  d;
  vImagePixelCount x = 3;
  x;
}
@end

Here, DSPComplex which is DSP based code, in the same framework - works fine, while vImagePixelCount - which is vImage based code - it fails. Can anyone help me on this? Is vImage not included in iOS4 ?

I am using iOS4.2 in the device.

Était-ce utile?

La solution

vImage is not available on iOS at the moment. Compare these two documents:

The one has the vImage functions, the other one doesn't. The reason it works in the Simulator is that the Simulator actually uses the Mac frameworks and not the iOS versions.

Autres conseils

It's worth noting here, since this is the top google result for "vImage iOS", that support for vImage has since been added to iOS 5.

The vImage reference for iOS is available here: https://developer.apple.com/library/ios/documentation/Performance/Conceptual/vImage/Introduction/Introduction.html

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top