30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

VectorCorrelateis 4 less than whatever number is reported for a<br />

stand alone VectorConvolve.<br />

rn () xk()yk n + ()<br />

k0=<br />

N1–<br />

∑ =<br />

DSP Library<br />

2004 Microchip Technology Inc. DS51456B-page 19<br />

.<br />

VectorDotProduct<br />

Description: VectorDotProductcomputes the sum of the products between<br />

corresponding elements of the source one and source two vectors.<br />

Include: dsp.h<br />

Prototype: extern fractional VectorDotProduct (<br />

int numElems,<br />

fractional* srcV1,<br />

fractional* srcV2<br />

);<br />

Arguments: numElems number of elements in source vectors<br />

srcV1 pointer to source one vector<br />

srcV2 pointer to source two vector<br />

Return Value: Value of the sum of products.<br />

Remarks: If the absolute value of the sum ofproducts is larger than 1-2<br />

-15<br />

, this<br />

operation results in saturation.<br />

This function can be self applicable.<br />

Source File: vdot.asm<br />

Function Profile: System resources usage:<br />

W0..W2 used, not restored<br />

W4..W5 used, not restored<br />

ACCA used, not restored<br />

CORCON saved, used, restored<br />

DOand REPEATinstruction usage:<br />

1 level DOinstructions<br />

no REPEATinstructions<br />

Program words (24-bit instructions):<br />

13<br />

Cycles (including C-function call and return overheads):<br />

Từ chương trình (hướng dẫn 24-bit):<br />

13<br />

Chu kỳ (bao gồm cả cuộc gọi C-chức năng và trả các chi phí):<br />

17 + 3 (numElems)<br />

VectorMax<br />

Mô tả: VectorMaxfinds yếu tố cuối cùng trong vector nguồn có giá trị<br />

lớn hơn hoặc bằng bất kỳ yếu tố vector trước. Sau đó, kết quả đầu ra<br />

rằng giá trị tối đa và chỉ số của phần tử tối đa.<br />

Bao gồm: dsp.h<br />

Nguyên mẫu: ở ngoài phân đoạn VectorMax (<br />

int numElems,<br />

phân đoạn * srcV,<br />

int * maxIndex<br />

);<br />

Đối số: numElems số phần tử trong vector nguồn<br />

srcV con trỏ tới vector nguồn<br />

maxIndex con trỏ để giữ cho chỉ số (cuối cùng) yếu tố tối đa<br />

Quay trở lại giá trị: giá trị tối đa trong vector.<br />

Ghi chú: Nếu srcV [i] = srcV [j] = maxVal, và i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!