source: proto/s2k/trunk/framework/src/toolchain/b2k/lang/paramBuiltin/idisa/IDISAPackages.java @ 4023

Last change on this file since 4023 was 4023, checked in by ksherdy, 5 years ago

Restructured b2k package.

File size: 851 bytes
Line 
1package toolchain.b2k.lang.paramBuiltin.idisa;
2
3import java.util.HashMap;
4import java.util.Map;
5
6public enum IDISAPackages {
7
8        ESIMD,
9        HSIMD,
10        MVMD,
11        SIMD,
12        BITBLOCK;
13       
14        private static final Map<String, IDISAPackages> packageName2IDISABuiltinMap = new HashMap<String, IDISAPackages>();
15           
16        static {
17                for(IDISAPackages idisaBuiltin : values()) {
18                        packageName2IDISABuiltinMap.put(idisaBuiltin.toString(), idisaBuiltin);
19                }
20    }
21       
22    public static IDISAPackages fromString(String operationName) {
23        return packageName2IDISABuiltinMap.get(operationName);
24    }
25   
26    private String packageName;
27   
28    private IDISAPackages() {
29        this.packageName = this.name().toLowerCase();
30    }
31       
32    public String getPackageName() {
33        return packageName;
34    }
35   
36    public String toString() {
37        return this.getPackageName();
38    }
39   
40}
Note: See TracBrowser for help on using the repository browser.