Reputation: 11143
I had a few questions about Accelerate framework.
What is the difference between Single Precision Float, Single-Precision Complex, Double-Precision Float, and Double-Precision Complex? And what should I be using for a simple struct like:
struct vector
{
float x;
float y;
float z;
};
Also can someone explain what each of the arguments to this sample function mean?
void cblas_cdotc_sub (
const int N,
const void *X,
const int incX,
const void *Y,
const int incY,
void *dotc
);
Apple's descriptions are a little unclear to me. What do they mean by the length for N? Is that the size of the vector in bytes? Or the actual spatial length of the vector?
Upvotes: 1
Views: 538
Reputation: 70733
Complex variables are 2 dimensional quantities, normally treated as the real and imaginary parts of complex numbers in arithmetic/math operations.
IEEE single and double floats allow differing amounts of binary precision (roughly the amount of significant digits without rounding error), very approximately 7 or so digits for single, around double that for double, plus a wider exponent range as well.
But single float arithmetic runs a lot faster on current iOS devices than does double (unlike the Simulator, where they may both run more the same speed.)
Apple's descriptions may require some basic knowledge of C data types, arrays and structures, and the mathematical theory of complex variables. I'd start by reading some books on basic C programming and numerical algorithms in C.
Upvotes: 4