2.3.7 VectorMin

Description

VectorMin returns the value and index of the last element in the source vector whose value is lesser than or equal to any previous vector element.

Prototype

fractional VectorMin (int numElems, fractional* srcV, int* minIndex);

Arguments

Parameters

Description

numElems

Number of elements in the source vector

srcV

Pointer to the source vector

minIndex

Pointer to the holder for the index of the (last) minimum element

Returns

Minimum value in the vector.

Remarks

If srcV[i] = srcV[j] = minVal, and i < j, then *minIndex = j.

Source File

  • vmin_aa.s

Function Profile

Device

Program Words

Cycles

PIC32A

10

32 + 4*(numElems - 1),

System resource usage

  • W0…W6 - used, not restored
  • REPEAT instruction/s usage – None