[78] | 1 | #include "Behavioural/include/Identification.h" |
---|
| 2 | |
---|
| 3 | namespace morpheo { |
---|
| 4 | namespace behavioural { |
---|
| 5 | |
---|
| 6 | uint32_t get_nb_thread (uint32_t nb_context , |
---|
| 7 | uint32_t nb_front_end , |
---|
| 8 | uint32_t nb_ooo_engine ) |
---|
| 9 | { |
---|
| 10 | return (nb_ooo_engine * |
---|
| 11 | nb_front_end * |
---|
| 12 | nb_context) ; |
---|
| 13 | } |
---|
| 14 | |
---|
| 15 | Tcontext_t get_num_thread (Tcontext_t num_context_id , uint32_t size_context_id , |
---|
| 16 | Tcontext_t num_front_end_id , uint32_t size_front_end_id , |
---|
| 17 | Tcontext_t num_ooo_engine_id, uint32_t size_ooo_engine_id) |
---|
| 18 | { |
---|
| 19 | return ((num_ooo_engine_id << (size_context_id + size_front_end_id)) | |
---|
| 20 | (num_front_end_id << (size_context_id)) | |
---|
| 21 | (num_context_id)); |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | Tcontext_t get_num_context (Tcontext_t num_thread , |
---|
| 25 | uint32_t size_context_id , |
---|
| 26 | uint32_t size_front_end_id , |
---|
| 27 | uint32_t size_ooo_engine_id) |
---|
| 28 | { |
---|
| 29 | return range<Tcontext_t>(num_thread, size_context_id); |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | Tcontext_t get_num_front_end (Tcontext_t num_thread , |
---|
| 33 | uint32_t size_context_id , |
---|
| 34 | uint32_t size_front_end_id , |
---|
| 35 | uint32_t size_ooo_engine_id) |
---|
| 36 | { |
---|
| 37 | return range<Tcontext_t>(num_thread>>size_context_id, size_front_end_id); |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | Tcontext_t get_num_ooo_engine (Tcontext_t num_thread , |
---|
| 41 | uint32_t size_context_id , |
---|
| 42 | uint32_t size_front_end_id , |
---|
| 43 | uint32_t size_ooo_engine_id) |
---|
| 44 | { |
---|
| 45 | return range<Tcontext_t>(num_thread>>(size_context_id+size_front_end_id), size_ooo_engine_id); |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | }; // end namespace behavioural |
---|
| 49 | }; // end namespace morpheo |
---|