public static long getMappingAccessFlags(MappingAccess ma) {
        switch (ma) {
            case MAP_READ_ONLY: return CL10.CL_MAP_READ;
            case MAP_READ_WRITE: return CL10.CL_MAP_READ | CL10.CL_MAP_WRITE;
            case MAP_WRITE_ONLY: return CL10.CL_MAP_WRITE;
            case MAP_WRITE_INVALIDATE: return CL12.CL_MAP_WRITE_INVALIDATE_REGION;
            default: throw new IllegalArgumentException("Unknown mapping access: "+ma);
        }
    }
Maps OpenCL error token values to their String representations. 
        Taken directly from org.lwjgl.opencl.Util
jme3-lwjgl/src/main/java/com/jme3/opencl/lwjgl/Utils.java