Last change
on this file since 74 was
71,
checked in by rosiere, 17 years ago
|
Modification of Statisctics
Add a new systemC component : Load_Store_Queue (tested with one benchmark and one configuration). Store don't supported the Data Buss Error (Load is supported)
|
File size:
670 bytes
|
Rev | Line | |
---|
[38] | 1 | #ifndef morpheo_changecase |
---|
| 2 | #define morpheo_changecase |
---|
| 3 | |
---|
| 4 | /* |
---|
| 5 | * $Id$ |
---|
| 6 | * |
---|
| 7 | * [ Description ] |
---|
| 8 | * |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | #include <string> |
---|
| 12 | #include <stdint.h> |
---|
| 13 | |
---|
| 14 | namespace morpheo { |
---|
| 15 | |
---|
[71] | 16 | inline void UpperCase(std::string& S) |
---|
[38] | 17 | { |
---|
| 18 | uint32_t n = S.size(); |
---|
| 19 | for (uint32_t j = 0; j < n; j++) |
---|
| 20 | { |
---|
| 21 | char sj = S[j]; |
---|
| 22 | if (sj >= 'a' && sj <= 'z') |
---|
| 23 | S[j] = static_cast<char>(sj - ('a' - 'A')); |
---|
| 24 | } |
---|
| 25 | } |
---|
| 26 | |
---|
[71] | 27 | inline void LowerCase(std::string& S) |
---|
[38] | 28 | { |
---|
| 29 | uint32_t n = S.size(); |
---|
| 30 | for (uint32_t j = 0; j < n; j++) |
---|
| 31 | { |
---|
| 32 | char sj = S[j]; |
---|
| 33 | if (sj >= 'A' && sj <= 'Z') |
---|
| 34 | S[j] = static_cast<char>(sj + ('a' - 'A')); |
---|
| 35 | } |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | }; // end namespace morpheo |
---|
| 39 | |
---|
| 40 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.