
Xc           @` sA   d  d l  m Z m Z m Z d  d l Z d  d l Z d   Z d S(   i    (   t   absolute_importt   print_functiont   divisionNc          C` s   t  j d k rI y t t j d  }  Wq t t f k
 rE d }  q Xn t  j d k r y t t j d  j    }  Wq t k
 r d }  q Xn6 y t j	 d  }  Wn  t t
 t f k
 r d }  n X|  S(   s2   
    Returns the number of CPUs in the system
    t   win32t   NUMBER_OF_PROCESSORSit   darwins   sysctl -n hw.ncput   SC_NPROCESSORS_ONLN(   t   syst   platformt   intt   ost   environt
   ValueErrort   KeyErrort   popent   readt   sysconft   OSErrort   AttributeError(   t   num(    (    s4   /tmp/pip-build-X4mzal/theano/theano/misc/cpucount.pyt   cpuCount%   s    
(   t
   __future__R    R   R   R
   R   R   (    (    (    s4   /tmp/pip-build-X4mzal/theano/theano/misc/cpucount.pyt   <module>    s   