PandA-2024.02
maxNumbers.c
Go to the documentation of this file.
1 #pragma HLS interface port = a mode = m_axi offset = direct
2 #pragma HLS interface port = n_ptr mode = m_axi offset = direct
3 #pragma HLS interface port = res mode = m_axi offset = direct
4 
5 void maxNumbers(int* a, unsigned int* n_ptr, int* res)
6 
7 {
8  unsigned i;
9  int result;
10  unsigned int n = *n_ptr;
11 
12  if(n == 0)
13  {
14  *res = (int)(1 << 31);
15  return;
16  }
17  result = a[0];
18  for(i = 1; i < n; ++i)
19  result = result < a[i] ? a[i] : result;
20  *res = result;
21 }
int result[SIZE]
Definition: adpcm.c:800
void maxNumbers(int *a, unsigned int *n_ptr, int *res)
Definition: maxNumbers.c:5

Generated on Mon Feb 12 2024 13:02:48 for PandA-2024.02 by doxygen 1.8.13