c2cf686f1f8e8a7f81b89010b60911648a0b77b1,binding/python/util.py,,_pv_linux_machine,#,17

Before Change



    cpu_info = subprocess.check_output(["cat", "/proc/cpuinfo"]).decode()

    hardware_info = [x for x in cpu_info.split("\n") if "Hardware" in x][0]
    model_info = [x for x in cpu_info.split("\n") if "model name" in x][0]

    if "BCM" in hardware_info:
        if "rev 7" in model_info:
            return "arm11"
        elif "rev 5" in model_info:
            return "cortex-a7"
        elif "rev 4" in model_info:
            return "cortex-a53"
        elif "rev 3" in model_info:
            return "cortex-a72"
    elif "AM33" in hardware_info:
        return "beaglebone"
    else:
        raise NotImplementedError("Unsupported CPU.")


def _pv_platform():
    pv_system = platform.system()
    if pv_system not in {"Darwin", "Linux", "Windows"}:
        raise ValueError("Unsupported system "%s"." % pv_system)

After Change


    if "ARM1176" == model_info: 
        return "arm11" + arch_info
    elif "Cortex-A53" == model_info:
        return "cortex-a53" + arch_info
    elif "Cortex-A72" == model_info:
        return "cortex-a72" + arch_info
    elif "Cortex-A7" == model_info:
        return "cortex-a7" + arch_info
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Picovoice/porcupine
Commit Name: c2cf686f1f8e8a7f81b89010b60911648a0b77b1
Time: 2021-02-26
Author: 42750891+mrrostam@users.noreply.github.com
File Name: binding/python/util.py
Class Name:
Method Name: _pv_linux_machine


Project Name: GoogleCloudPlatform/healthcare
Commit Name: 8a43360b5683edc8d8e4b9461b01a9d1f8dcd782
Time: 2019-05-21
Author: umairidris@google.com
File Name: deploy/create_project.py
Class Name:
Method Name: deploy_project_resources


Project Name: nipy/dipy
Commit Name: 9132de3d6bf2b57bc9977975d0650beeaa765daf
Time: 2020-07-21
Author: skab12@gmail.com
File Name: dipy/io/vtk.py
Class Name:
Method Name: load_polydata