ó
\K]c           @` s   d  Z  d d l m Z m Z m Z d d l Z d d l Z d d l Td d l	 m
 Z
 d   Z e   r d d l m Z e e j  Z n g  Z d	   Z d S(
   s0   
Module that deals with HSA in a high level way
i    (   t   print_functiont   absolute_importt   divisionNi   (   t   *(   t   atomicc          C` s}   d d l  m }  d d l m } m } t } y | j   t } Wn- y | j   j   } t } Wqp qp Xn X|  j	 o| | S(   sÆ   Returns a boolean to indicate the availability of a HSA runtime.

    This will force initialization of the driver if it hasn't been
    initialized. It also checks that a toolchain is present.
    i   (   t   hsa(   t   hlct   libhlc(
   t   hsadrv.driverR   R   R   t   Falset   HLCt   Truet   CmdLinet   check_toolingt   is_available(   R   R   R   t   has_a_toolchaint   cmd(    (    s1   lib/python2.7/site-packages/numba/roc/__init__.pyR   
   s    


(   R   c          O` s.   t    s t d   n  t j j d |  |  S(   Ns   HSA is not detecteds   numba.hsa.tests(   R   t   RuntimeErrort   numbat   testingt   test(   t   argst   kwargs(    (    s1   lib/python2.7/site-packages/numba/roc/__init__.pyR   '   s    	(   t   __doc__t
   __future__R    R   R   t   ost   numba.testingR   t   apit   stubsR   R   R   R   t   listt   agentsR   (    (    (    s1   lib/python2.7/site-packages/numba/roc/__init__.pyt   <module>   s   
		