- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List

bit.hpp
Go to the documentation of this file.

    00001
    00002
    00003
    00004
    00005
    00006
    00007
    00008
    00009
    00010
    00011
    00012
    00013
    00014
    00015
    00016
    00017
    00018
    00019
    00020
    00021
    00022
    00023
    00024
    00025
    00026
    00027
    00028
    00029
    00030
    00031
    00032
    00033
    00034
    00035
    00036
    00037
    00038
    00039 #ifndef GLM_GTX_bit
    00040 #define GLM_GTX_bit GLM_VERSION
    00041
    00042 // Dependency:
    00043 #include "../glm.hpp"
    00044 #include "../gtc/half_float.hpp"
    00045
    00046 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
    00047 #       pragma message("GLM: GLM_GTX_bit extension included")
    00048 #endif
    00049
    00050 namespace glm
    00051 {
    00054
    00057         template <typename genIType>
    00058         genIType mask(genIType const & count);
    00059
    00063         template <typename genIUType, typename sizeType>
    00064         genIUType extractField(
    00065                 genIUType const & v,
    00066                 sizeType const & first,
    00067                 sizeType const & count);
    00068
    00071         template <typename genType>
    00072         int lowestBit(genType const & value);
    00073
    00076         template <typename genType>
    00077         int highestBit(genType const & value);
    00078
    00081         template <typename genType>
    00082         genType highestBitValue(genType const & value);
    00083
    00086         template <typename genType>
    00087         bool isPowerOfTwo(genType const & value);
    00088
    00091         template <typename genType>
    00092         genType powerOfTwoAbove(genType const & value);
    00093
    00096         template <typename genType>
    00097         genType powerOfTwoBelow(genType const & value);
    00098
    00101         template <typename genType>
    00102         genType powerOfTwoNearest(genType const & value);
    00103
    00106         template <typename genType>
    00107         genType bitRevert(genType const & value);
    00108
    00111         template <typename genType>
    00112         genType bitRotateRight(genType const & In, std::size_t Shift);
    00113
    00116         template <typename genType>
    00117         genType bitRotateLeft(genType const & In, std::size_t Shift);
    00118
    00121         template <typename genIUType>
    00122         genIUType fillBitfieldWithOne(
    00123                 genIUType const & Value,
    00124                 int const & FromBit,
    00125                 int const & ToBit);
    00126
    00129         template <typename genIUType>
    00130         genIUType fillBitfieldWithZero(
    00131                 genIUType const & Value,
    00132                 int const & FromBit,
    00133                 int const & ToBit);
    00134
    00136 } //namespace glm
    00137
    00138 #include "bit.inl"
    00139
    00140 #endif//GLM_GTX_bit