| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*************************************** | ||
| 2 | Auteur : Pierre Aubert | ||
| 3 | Mail : pierre.aubert@lapp.in2p3.fr | ||
| 4 | Licence : CeCILL-C | ||
| 5 | ****************************************/ | ||
| 6 | |||
| 7 | |||
| 8 | #include "phoenix_alignement_type.h" | ||
| 9 | |||
| 10 | ///Get the alignement of a bool | ||
| 11 | /** @return alignement of a bool | ||
| 12 | */ | ||
| 13 | template<> | ||
| 14 | 2 | size_t phoenix_alignement_type<bool>(){return PHOENIX_VECTOR_SIZE_CHAR;} | |
| 15 | |||
| 16 | ///Get the alignement of a char | ||
| 17 | /** @return alignement of a char | ||
| 18 | */ | ||
| 19 | template<> | ||
| 20 | 2 | size_t phoenix_alignement_type<char>(){return PHOENIX_VECTOR_SIZE_CHAR;} | |
| 21 | |||
| 22 | ///Get the alignement of an unsigned char | ||
| 23 | /** @return alignement of an unsigned char | ||
| 24 | */ | ||
| 25 | template<> | ||
| 26 | 2 | size_t phoenix_alignement_type<unsigned char>(){return PHOENIX_VECTOR_SIZE_CHAR;} | |
| 27 | |||
| 28 | ///Get the alignement of a short | ||
| 29 | /** @return alignement of a short | ||
| 30 | */ | ||
| 31 | template<> | ||
| 32 | 2 | size_t phoenix_alignement_type<short>(){return PHOENIX_VECTOR_SIZE_SHORT;} | |
| 33 | |||
| 34 | ///Get the alignement of an unsigned short | ||
| 35 | /** @return alignement of an unsigned short | ||
| 36 | */ | ||
| 37 | template<> | ||
| 38 | 2 | size_t phoenix_alignement_type<unsigned short>(){return PHOENIX_VECTOR_SIZE_SHORT;} | |
| 39 | |||
| 40 | ///Get the alignement of an int | ||
| 41 | /** @return alignement of an int | ||
| 42 | */ | ||
| 43 | template<> | ||
| 44 | 2 | size_t phoenix_alignement_type<int>(){return PHOENIX_VECTOR_SIZE_INT;} | |
| 45 | |||
| 46 | ///Get the alignement of an unsigned int | ||
| 47 | /** @return alignement of an unsigned int | ||
| 48 | */ | ||
| 49 | template<> | ||
| 50 | 2 | size_t phoenix_alignement_type<unsigned int>(){return PHOENIX_VECTOR_SIZE_INT;} | |
| 51 | |||
| 52 | ///Get the alignement of a long int | ||
| 53 | /** @return alignement of a long int | ||
| 54 | */ | ||
| 55 | template<> | ||
| 56 | 2 | size_t phoenix_alignement_type<long>(){return PHOENIX_VECTOR_SIZE_LONG_INT;} | |
| 57 | |||
| 58 | ///Get the alignement of a long unsigned int | ||
| 59 | /** @return alignement of a long unsigned int | ||
| 60 | */ | ||
| 61 | template<> | ||
| 62 | 2 | size_t phoenix_alignement_type<unsigned long>(){return PHOENIX_VECTOR_SIZE_LONG_INT;} | |
| 63 | |||
| 64 | ///Get the alignement of a float | ||
| 65 | /** @return alignement of a float | ||
| 66 | */ | ||
| 67 | template<> | ||
| 68 | 2 | size_t phoenix_alignement_type<float>(){return PHOENIX_VECTOR_SIZE_FLOAT;} | |
| 69 | |||
| 70 | ///Get the alignement of a float | ||
| 71 | /** @return alignement of a float | ||
| 72 | */ | ||
| 73 | template<> | ||
| 74 | 2 | size_t phoenix_alignement_type<double>(){return PHOENIX_VECTOR_SIZE_FLOAT;} | |
| 75 | |||
| 76 | |||
| 77 | |||
| 78 | ///Get the alignement in bytes of a bool | ||
| 79 | /** @return alignement in bytes of a bool | ||
| 80 | */ | ||
| 81 | template<> | ||
| 82 | 1 | size_t phoenix_alignement_in_bytes<bool>(){return PHOENIX_VECTOR_SIZE_BYTE_INT;} | |
| 83 | |||
| 84 | ///Get the alignement in bytes of a char | ||
| 85 | /** @return alignement in bytes of a char | ||
| 86 | */ | ||
| 87 | template<> | ||
| 88 | 1 | size_t phoenix_alignement_in_bytes<char>(){return PHOENIX_VECTOR_SIZE_BYTE_INT;} | |
| 89 | |||
| 90 | ///Get the alignement in bytes of an unsigned char | ||
| 91 | /** @return alignement in bytes of an unsigned char | ||
| 92 | */ | ||
| 93 | template<> | ||
| 94 | 1 | size_t phoenix_alignement_in_bytes<unsigned char>(){return PHOENIX_VECTOR_SIZE_BYTE_INT;} | |
| 95 | |||
| 96 | ///Get the alignement in bytes of a short | ||
| 97 | /** @return alignement in bytes of a short | ||
| 98 | */ | ||
| 99 | template<> | ||
| 100 | 1 | size_t phoenix_alignement_in_bytes<short>(){return PHOENIX_VECTOR_SIZE_BYTE_INT;} | |
| 101 | |||
| 102 | ///Get the alignement in bytes of an unsigned short | ||
| 103 | /** @return alignement in bytes of an unsigned short | ||
| 104 | */ | ||
| 105 | template<> | ||
| 106 | 1 | size_t phoenix_alignement_in_bytes<unsigned short>(){return PHOENIX_VECTOR_SIZE_BYTE_INT;} | |
| 107 | |||
| 108 | ///Get the alignement in bytes of an int | ||
| 109 | /** @return alignement in bytes of an int | ||
| 110 | */ | ||
| 111 | template<> | ||
| 112 | 3 | size_t phoenix_alignement_in_bytes<int>(){return PHOENIX_VECTOR_SIZE_BYTE_INT;} | |
| 113 | |||
| 114 | ///Get the alignement in bytes of an unsigned int | ||
| 115 | /** @return alignement in bytes of an unsigned int | ||
| 116 | */ | ||
| 117 | template<> | ||
| 118 | 1 | size_t phoenix_alignement_in_bytes<unsigned int>(){return PHOENIX_VECTOR_SIZE_BYTE_INT;} | |
| 119 | |||
| 120 | ///Get the alignement in bytes of a long int | ||
| 121 | /** @return alignement in bytes of a long int | ||
| 122 | */ | ||
| 123 | template<> | ||
| 124 | 1 | size_t phoenix_alignement_in_bytes<long>(){return PHOENIX_VECTOR_SIZE_BYTE_INT;} | |
| 125 | |||
| 126 | ///Get the alignement in bytes of a long unsigned int | ||
| 127 | /** @return alignement in bytes of a long unsigned int | ||
| 128 | */ | ||
| 129 | template<> | ||
| 130 | 1 | size_t phoenix_alignement_in_bytes<unsigned long>(){return PHOENIX_VECTOR_SIZE_BYTE_INT;} | |
| 131 | |||
| 132 | ///Get the alignement in bytes of a float | ||
| 133 | /** @return alignement in bytes of a float | ||
| 134 | */ | ||
| 135 | template<> | ||
| 136 | 1 | size_t phoenix_alignement_in_bytes<float>(){return PHOENIX_VECTOR_SIZE_BYTE_FLOAT;} | |
| 137 | |||
| 138 | ///Get the alignement in bytes of a float | ||
| 139 | /** @return alignement in bytes of a float | ||
| 140 | */ | ||
| 141 | template<> | ||
| 142 | 1 | size_t phoenix_alignement_in_bytes<double>(){return PHOENIX_VECTOR_SIZE_BYTE_FLOAT;} | |
| 143 | |||
| 144 | |||
| 145 | |||
| 146 |