a
    ýÞ{b·  ã                   @   s   d Z G dd„ dƒZdS )a›  
CPU
===

Simple Example
---------------

To get CPU count::
    >>> from plyer import cpu
    >>> # 1 socket, 1 core per socket, 2 threads per core
    >>> cpu.sockets   # 1 CPU socket (or slot)
    1
    >>> cpu.physical  # 1 CPU socket * 1 core per socket
    1
    >>> cpu.logical   # 1 CPU socket * 1 core per socket * 2 threads per core
    2

Supported Platforms
-------------------

MacOS
Linux
Windows
c                   @   st   e Zd ZdZedd„ ƒZedd„ ƒZedd„ ƒZedd	„ ƒZed
d„ ƒZ	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ ZdS )ÚCPUz]
    Facade providing info about sockets, physical and logical
    number of processors.
    c                 C   s   |   ¡ S )zB
        Property that contains the count of CPU sockets.
        )Ú_sockets©Úself© r   úa/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/plyer/facades/cpu.pyÚsockets!   s    zCPU.socketsc                 C   s   |   ¡ S )z£
        Property that contains the total number of physical cores
        (max core count) in the system.

        .. note:: `sockets * cores per socket`
        )Ú	_physicalr   r   r   r   Úphysical(   s    zCPU.physicalc                 C   s   |   ¡ S )z·
        Property that contains the total number of logical cores
        (max thread count) in the system.

        .. note:: `sockets * cores per socket * threads per core`
        )Ú_logicalr   r   r   r   Úlogical2   s    zCPU.logicalc                 C   s   |   ¡ S )z’
        Property that contains the count of L1, L2, L3 caches in the system
        as a dictionary `{'L1': int, 'L2': int, 'L3': int}`.
        )Ú_cacher   r   r   r   Úcache<   s    z	CPU.cachec                 C   s   |   ¡ S )zš
        Property that contains the count of NUMA nodes in the system.

        .. note:: https://en.wikipedia.org/wiki/Non-uniform_memory_access
        )Ú_numar   r   r   r   ÚnumaD   s    zCPU.numac                 C   s
   t ƒ ‚d S ©N©ÚNotImplementedErrorr   r   r   r   r   O   s    zCPU._socketsc                 C   s
   t ƒ ‚d S r   r   r   r   r   r   r   R   s    zCPU._physicalc                 C   s
   t ƒ ‚d S r   r   r   r   r   r   r
   U   s    zCPU._logicalc                 C   s
   t ƒ ‚d S r   r   r   r   r   r   r   X   s    z
CPU._cachec                 C   s
   t ƒ ‚d S r   r   r   r   r   r   r   [   s    z	CPU._numaN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r	   r   r   r   r   r   r
   r   r   r   r   r   r   r      s    

	
	


r   N)r   r   r   r   r   r   Ú<module>   s   