| 849 | /// Select small types for the layered graph propagator |
| 850 | template<class Var> |
| 851 | forceinline ExecStatus |
| 852 | post_lgp(Home home, const VarArgArray<Var>& x, const DFA& dfa) { |
| 853 | Gecode::Support::IntType t_state_idx = |
| 854 | Gecode::Support::u_type(static_cast<unsigned int>(dfa.n_states())); |
| 855 | Gecode::Support::IntType t_degree = |
| 856 | Gecode::Support::u_type(dfa.max_degree()); |
| 857 | Gecode::Support::IntType t_val = |
| 858 | std::max(Support::s_type(dfa.symbol_min()), |
| 859 | Support::s_type(dfa.symbol_max())); |
| 860 | switch (t_val) { |
| 861 | case Gecode::Support::IT_CHAR: |
| 862 | // fall through |
| 863 | case Gecode::Support::IT_SHRT: |
| 864 | switch (t_state_idx) { |
| 865 | case Gecode::Support::IT_CHAR: |
| 866 | switch (t_degree) { |
| 867 | case Gecode::Support::IT_CHAR: |
| 868 | return Extensional::LayeredGraph |
| 869 | <typename VarTraits<Var>::View,short int,unsigned char,unsigned char> |
| 870 | ::post(home,x,dfa); |
| 871 | case Gecode::Support::IT_SHRT: |
| 872 | return Extensional::LayeredGraph |
| 873 | <typename VarTraits<Var>::View,short int,unsigned short int,unsigned char> |
| 874 | ::post(home,x,dfa); |
| 875 | case Gecode::Support::IT_INT: |
| 876 | return Extensional::LayeredGraph |
| 877 | <typename VarTraits<Var>::View,short int,unsigned int,unsigned char> |
| 878 | ::post(home,x,dfa); |
| 879 | default: GECODE_NEVER; |
| 880 | } |
| 881 | break; |
| 882 | case Gecode::Support::IT_SHRT: |
| 883 | switch (t_degree) { |
| 884 | case Gecode::Support::IT_CHAR: |
| 885 | return Extensional::LayeredGraph |
| 886 | <typename VarTraits<Var>::View,short int,unsigned char,unsigned short int> |
| 887 | ::post(home,x,dfa); |
| 888 | case Gecode::Support::IT_SHRT: |
| 889 | return Extensional::LayeredGraph |
| 890 | <typename VarTraits<Var>::View,short int,unsigned short int,unsigned short int> |
| 891 | ::post(home,x,dfa); |
| 892 | case Gecode::Support::IT_INT: |
| 893 | return Extensional::LayeredGraph |
| 894 | <typename VarTraits<Var>::View,short int,unsigned int,unsigned short int> |
| 895 | ::post(home,x,dfa); |
| 896 | default: GECODE_NEVER; |
| 897 | } |
| 898 | break; |
| 899 | case Gecode::Support::IT_INT: |
| 900 | switch (t_degree) { |
| 901 | case Gecode::Support::IT_CHAR: |
| 902 | return Extensional::LayeredGraph |
| 903 | <typename VarTraits<Var>::View,short int,unsigned char,unsigned int> |
| 904 | ::post(home,x,dfa); |
| 905 | case Gecode::Support::IT_SHRT: |
| 906 | return Extensional::LayeredGraph |
| 907 | <typename VarTraits<Var>::View,short int,unsigned short int,unsigned int> |
| 908 | ::post(home,x,dfa); |
nothing calls this directly
no test coverage detected