-
Notifications
You must be signed in to change notification settings - Fork 0
/
FPFastMathModeShift.java
58 lines (52 loc) · 1.84 KB
/
FPFastMathModeShift.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package com.destranix.glslang;
public enum FPFastMathModeShift {
FPFastMathModeNotNaNShift(Main.FP_FAST_MATH_MODE_NOT_NAN_SHIFT),
FPFastMathModeNotInfShift(Main.FP_FAST_MATH_MODE_NOT_INF_SHIFT),
FPFastMathModeNSZShift(Main.FP_FAST_MATH_MODE_NSZ_SHIFT),
FPFastMathModeAllowRecipShift(Main.FP_FAST_MATH_MODE_ALLOW_RECIP_SHIFT),
FPFastMathModeFastShift(Main.FP_FAST_MATH_MODE_FAST_SHIFT),
FPFastMathModeMax(Main.FP_FAST_MATH_MODE_MAX);
private final int value;
private FPFastMathModeShift(int value) {
this.value = value;
}
public int getConstant() {
return this.value;
}
public static FPFastMathModeShift valueByStr(String str) {
switch (str) {
case "FPFastMathModeNotNaNShift":
return FPFastMathModeNotNaNShift;
case "FPFastMathModeNotInfShift":
return FPFastMathModeNotInfShift;
case "FPFastMathModeNSZShift":
return FPFastMathModeNSZShift;
case "FPFastMathModeAllowRecipShift":
return FPFastMathModeAllowRecipShift;
case "FPFastMathModeFastShift":
return FPFastMathModeFastShift;
case "FPFastMathModeMax":
return FPFastMathModeMax;
default:
throw new IllegalArgumentException("Cannot translate string into enum value!");
}
}
public static FPFastMathModeShift valueByConstant(int constant) {
switch (constant) {
case Main.FP_FAST_MATH_MODE_NOT_NAN_SHIFT:
return FPFastMathModeNotNaNShift;
case Main.FP_FAST_MATH_MODE_NOT_INF_SHIFT:
return FPFastMathModeNotInfShift;
case Main.FP_FAST_MATH_MODE_NSZ_SHIFT:
return FPFastMathModeNSZShift;
case Main.FP_FAST_MATH_MODE_ALLOW_RECIP_SHIFT:
return FPFastMathModeAllowRecipShift;
case Main.FP_FAST_MATH_MODE_FAST_SHIFT:
return FPFastMathModeFastShift;
case Main.FP_FAST_MATH_MODE_MAX:
return FPFastMathModeMax;
default:
throw new IllegalArgumentException("Cannot translate constant into enum value!");
}
}
}