Last change
on this file since 85 was
81,
checked in by rosiere, 16 years ago
|
- Finish Environment (and test)
- Continue predictor_unit
- Add external tools
- svn keyword "Id" set
|
-
Property svn:keywords set to
Id
|
File size:
402 bytes
|
Rev | Line | |
---|
[78] | 1 | #ifndef morpheo_max |
---|
| 2 | #define morpheo_max |
---|
| 3 | |
---|
| 4 | /* |
---|
| 5 | * $Id: Max.h 81 2008-04-15 18:40:01Z rosiere $ |
---|
| 6 | * |
---|
| 7 | * with a stephane dubuisson initial idea |
---|
| 8 | * |
---|
| 9 | * [ Description ] |
---|
| 10 | * |
---|
| 11 | */ |
---|
| 12 | |
---|
| 13 | #include <stdint.h> |
---|
| 14 | |
---|
| 15 | namespace morpheo { |
---|
| 16 | |
---|
| 17 | template<typename T> inline T max (const T * x, uint32_t size1) |
---|
| 18 | { |
---|
| 19 | T res = 0; |
---|
| 20 | |
---|
| 21 | for (uint32_t i=0; i<size1; i++) |
---|
| 22 | if (res<x[i]) |
---|
| 23 | res = x[i]; |
---|
| 24 | |
---|
| 25 | return res; |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | }; // end namespace morpheo |
---|
| 29 | |
---|
| 30 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.