0

If I ListCorrelate two list of real doubles

{{a,b,c},{d,e,f}}
{{g,h,i},{j,k,l},{m,n,o}}

in Mathematica I get

{{a*g + b*h + c*i + d*j + e*k + f*l},{a*j + b*k + c*l + d*m + e*n + f*o}}

Can anyone tell me the equivalent function in Apple's vDSP for c? Thanks

Ali
  • 503
  • 6
  • 20
ddd
  • 23
  • 7

1 Answers1

3

The specific case you show can be performed with vDSP_desampD(B, 3, A, C, 2, 6), where A is a pointer to the start of your first list, B is a pointer to the start of the second list, and C is a pointer to space for the output. The second parameter, 3, is the number of elements in each row/sub-list in B. The fifth parameter, 2, is the number of output elements desired. The last parameter 6, is the number of elements in A.

Eric Postpischil
  • 195,579
  • 13
  • 168
  • 312