<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # 3.5。 CUDA Python 中支持的 Python 功能 > 原文: [http://numba.pydata.org/numba-doc/latest/cuda/cudapysupported.html](http://numba.pydata.org/numba-doc/latest/cuda/cudapysupported.html) 此頁面列出了 CUDA Python 支持的 Python 功能。這包括使用`@cuda.jit`和針對 CUDA GPU 的其他更高級 Numba 裝飾器編譯的所有內核和設備函數。 ## 3.5.1。語言 ### 3.5.1.1。執行模型 CUDA Python 直接映射到 CUDA 的 _ 單指令多線程 _ 執行(SIMT)模型。每條指令由多個線程并行隱式執行。使用此執行模型,數組表達式不太有用,因為我們不希望多個線程執行相同的任務。相反,我們希望線程以合作的方式執行任務。 有關詳細信息,請參閱 [CUDA 編程指南](http://docs.nvidia.com/cuda/cuda-c-programming-guide/#programming-model)。 ### 3.5.1.2。構造 不支持以下 Python 構造: * 異常處理(`try .. except`,`try .. finally`) * 上下文管理(`with`語句) * 理解(列表,字典,集合或生成器理解) * 生成器(任何`yield`語句) 支持`raise`和`assert`語句。參見 [nopython 語言支持](../reference/pysupported.html#pysupported-language)。 ## 3.5.2。內置類型 以下內置類型支持從 CPU nopython 模式繼承。 * INT * 浮動 * 復雜 * 布爾 * 沒有 * 元組 參見 [nopython 內置類型](../reference/pysupported.html#pysupported-builtin-types)。 ## 3.5.3。內置功能 支持以下內置函數: * [`abs()`](https://docs.python.org/3/library/functions.html#abs "(in Python v3.7)") * [`bool`](https://docs.python.org/3/library/functions.html#bool "(in Python v3.7)") * [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.7)") * [`enumerate()`](https://docs.python.org/3/library/functions.html#enumerate "(in Python v3.7)") * [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.7)") * [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.7)") :只有單參數形式 * [`len()`](https://docs.python.org/3/library/functions.html#len "(in Python v3.7)") * [`min()`](https://docs.python.org/3/library/functions.html#min "(in Python v3.7)") :只有多參數形式 * [`max()`](https://docs.python.org/3/library/functions.html#max "(in Python v3.7)") :只有多參數形式 * [`range`](https://docs.python.org/3/library/stdtypes.html#range "(in Python v3.7)") :即使在 Python 2 中,語義也類似于 Python 3:返回范圍對象而不是值數組。 * [`round()`](https://docs.python.org/3/library/functions.html#round "(in Python v3.7)") * [`zip()`](https://docs.python.org/3/library/functions.html#zip "(in Python v3.7)") ## 3.5.4。標準庫模塊 ### 3.5.4.1。 `cmath` 支持 [`cmath`](https://docs.python.org/3/library/cmath.html#module-cmath "(in Python v3.7)") 模塊的以下功能: * [`cmath.acos()`](https://docs.python.org/3/library/cmath.html#cmath.acos "(in Python v3.7)") * [`cmath.acosh()`](https://docs.python.org/3/library/cmath.html#cmath.acosh "(in Python v3.7)") * [`cmath.asin()`](https://docs.python.org/3/library/cmath.html#cmath.asin "(in Python v3.7)") * [`cmath.asinh()`](https://docs.python.org/3/library/cmath.html#cmath.asinh "(in Python v3.7)") * [`cmath.atan()`](https://docs.python.org/3/library/cmath.html#cmath.atan "(in Python v3.7)") * [`cmath.atanh()`](https://docs.python.org/3/library/cmath.html#cmath.atanh "(in Python v3.7)") * [`cmath.cos()`](https://docs.python.org/3/library/cmath.html#cmath.cos "(in Python v3.7)") * [`cmath.cosh()`](https://docs.python.org/3/library/cmath.html#cmath.cosh "(in Python v3.7)") * [`cmath.exp()`](https://docs.python.org/3/library/cmath.html#cmath.exp "(in Python v3.7)") * [`cmath.isfinite()`](https://docs.python.org/3/library/cmath.html#cmath.isfinite "(in Python v3.7)") * [`cmath.isinf()`](https://docs.python.org/3/library/cmath.html#cmath.isinf "(in Python v3.7)") * [`cmath.isnan()`](https://docs.python.org/3/library/cmath.html#cmath.isnan "(in Python v3.7)") * [`cmath.log()`](https://docs.python.org/3/library/cmath.html#cmath.log "(in Python v3.7)") * [`cmath.log10()`](https://docs.python.org/3/library/cmath.html#cmath.log10 "(in Python v3.7)") * [`cmath.phase()`](https://docs.python.org/3/library/cmath.html#cmath.phase "(in Python v3.7)") * [`cmath.polar()`](https://docs.python.org/3/library/cmath.html#cmath.polar "(in Python v3.7)") * [`cmath.rect()`](https://docs.python.org/3/library/cmath.html#cmath.rect "(in Python v3.7)") * [`cmath.sin()`](https://docs.python.org/3/library/cmath.html#cmath.sin "(in Python v3.7)") * [`cmath.sinh()`](https://docs.python.org/3/library/cmath.html#cmath.sinh "(in Python v3.7)") * [`cmath.sqrt()`](https://docs.python.org/3/library/cmath.html#cmath.sqrt "(in Python v3.7)") * [`cmath.tan()`](https://docs.python.org/3/library/cmath.html#cmath.tan "(in Python v3.7)") * [`cmath.tanh()`](https://docs.python.org/3/library/cmath.html#cmath.tanh "(in Python v3.7)") ### 3.5.4.2。 `math` 支持 [`math`](https://docs.python.org/3/library/math.html#module-math "(in Python v3.7)") 模塊的以下功能: * [`math.acos()`](https://docs.python.org/3/library/math.html#math.acos "(in Python v3.7)") * [`math.asin()`](https://docs.python.org/3/library/math.html#math.asin "(in Python v3.7)") * [`math.atan()`](https://docs.python.org/3/library/math.html#math.atan "(in Python v3.7)") * `math.arctan()` * [`math.acosh()`](https://docs.python.org/3/library/math.html#math.acosh "(in Python v3.7)") * [`math.asinh()`](https://docs.python.org/3/library/math.html#math.asinh "(in Python v3.7)") * [`math.atanh()`](https://docs.python.org/3/library/math.html#math.atanh "(in Python v3.7)") * [`math.cos()`](https://docs.python.org/3/library/math.html#math.cos "(in Python v3.7)") * [`math.sin()`](https://docs.python.org/3/library/math.html#math.sin "(in Python v3.7)") * [`math.tan()`](https://docs.python.org/3/library/math.html#math.tan "(in Python v3.7)") * [`math.hypot()`](https://docs.python.org/3/library/math.html#math.hypot "(in Python v3.7)") * [`math.cosh()`](https://docs.python.org/3/library/math.html#math.cosh "(in Python v3.7)") * [`math.sinh()`](https://docs.python.org/3/library/math.html#math.sinh "(in Python v3.7)") * [`math.tanh()`](https://docs.python.org/3/library/math.html#math.tanh "(in Python v3.7)") * [`math.atan2()`](https://docs.python.org/3/library/math.html#math.atan2 "(in Python v3.7)") * [`math.erf()`](https://docs.python.org/3/library/math.html#math.erf "(in Python v3.7)") * [`math.erfc()`](https://docs.python.org/3/library/math.html#math.erfc "(in Python v3.7)") * [`math.exp()`](https://docs.python.org/3/library/math.html#math.exp "(in Python v3.7)") * [`math.expm1()`](https://docs.python.org/3/library/math.html#math.expm1 "(in Python v3.7)") * [`math.fabs()`](https://docs.python.org/3/library/math.html#math.fabs "(in Python v3.7)") * [`math.gamma()`](https://docs.python.org/3/library/math.html#math.gamma "(in Python v3.7)") * [`math.lgamma()`](https://docs.python.org/3/library/math.html#math.lgamma "(in Python v3.7)") * [`math.log()`](https://docs.python.org/3/library/math.html#math.log "(in Python v3.7)") * [`math.log10()`](https://docs.python.org/3/library/math.html#math.log10 "(in Python v3.7)") * [`math.log1p()`](https://docs.python.org/3/library/math.html#math.log1p "(in Python v3.7)") * [`math.sqrt()`](https://docs.python.org/3/library/math.html#math.sqrt "(in Python v3.7)") * [`math.pow()`](https://docs.python.org/3/library/math.html#math.pow "(in Python v3.7)") * [`math.ceil()`](https://docs.python.org/3/library/math.html#math.ceil "(in Python v3.7)") * [`math.floor()`](https://docs.python.org/3/library/math.html#math.floor "(in Python v3.7)") * [`math.copysign()`](https://docs.python.org/3/library/math.html#math.copysign "(in Python v3.7)") * [`math.fmod()`](https://docs.python.org/3/library/math.html#math.fmod "(in Python v3.7)") * [`math.isnan()`](https://docs.python.org/3/library/math.html#math.isnan "(in Python v3.7)") * [`math.isinf()`](https://docs.python.org/3/library/math.html#math.isinf "(in Python v3.7)") ### 3.5.4.3。 `operator` 支持 [`operator`](https://docs.python.org/3/library/operator.html#module-operator "(in Python v3.7)") 模塊的以下功能: * [`operator.add()`](https://docs.python.org/3/library/operator.html#operator.add "(in Python v3.7)") * [`operator.and_()`](https://docs.python.org/3/library/operator.html#operator.and_ "(in Python v3.7)") * `operator.div()`(僅限 Python 2) * [`operator.eq()`](https://docs.python.org/3/library/operator.html#operator.eq "(in Python v3.7)") * [`operator.floordiv()`](https://docs.python.org/3/library/operator.html#operator.floordiv "(in Python v3.7)") * [`operator.ge()`](https://docs.python.org/3/library/operator.html#operator.ge "(in Python v3.7)") * [`operator.gt()`](https://docs.python.org/3/library/operator.html#operator.gt "(in Python v3.7)") * [`operator.iadd()`](https://docs.python.org/3/library/operator.html#operator.iadd "(in Python v3.7)") * [`operator.iand()`](https://docs.python.org/3/library/operator.html#operator.iand "(in Python v3.7)") * `operator.idiv()`(僅限 Python 2) * [`operator.ifloordiv()`](https://docs.python.org/3/library/operator.html#operator.ifloordiv "(in Python v3.7)") * [`operator.ilshift()`](https://docs.python.org/3/library/operator.html#operator.ilshift "(in Python v3.7)") * [`operator.imod()`](https://docs.python.org/3/library/operator.html#operator.imod "(in Python v3.7)") * [`operator.imul()`](https://docs.python.org/3/library/operator.html#operator.imul "(in Python v3.7)") * [`operator.invert()`](https://docs.python.org/3/library/operator.html#operator.invert "(in Python v3.7)") * [`operator.ior()`](https://docs.python.org/3/library/operator.html#operator.ior "(in Python v3.7)") * [`operator.ipow()`](https://docs.python.org/3/library/operator.html#operator.ipow "(in Python v3.7)") * [`operator.irshift()`](https://docs.python.org/3/library/operator.html#operator.irshift "(in Python v3.7)") * [`operator.isub()`](https://docs.python.org/3/library/operator.html#operator.isub "(in Python v3.7)") * [`operator.itruediv()`](https://docs.python.org/3/library/operator.html#operator.itruediv "(in Python v3.7)") * [`operator.ixor()`](https://docs.python.org/3/library/operator.html#operator.ixor "(in Python v3.7)") * [`operator.le()`](https://docs.python.org/3/library/operator.html#operator.le "(in Python v3.7)") * [`operator.lshift()`](https://docs.python.org/3/library/operator.html#operator.lshift "(in Python v3.7)") * [`operator.lt()`](https://docs.python.org/3/library/operator.html#operator.lt "(in Python v3.7)") * [`operator.mod()`](https://docs.python.org/3/library/operator.html#operator.mod "(in Python v3.7)") * [`operator.mul()`](https://docs.python.org/3/library/operator.html#operator.mul "(in Python v3.7)") * [`operator.ne()`](https://docs.python.org/3/library/operator.html#operator.ne "(in Python v3.7)") * [`operator.neg()`](https://docs.python.org/3/library/operator.html#operator.neg "(in Python v3.7)") * [`operator.not_()`](https://docs.python.org/3/library/operator.html#operator.not_ "(in Python v3.7)") * [`operator.or_()`](https://docs.python.org/3/library/operator.html#operator.or_ "(in Python v3.7)") * [`operator.pos()`](https://docs.python.org/3/library/operator.html#operator.pos "(in Python v3.7)") * [`operator.pow()`](https://docs.python.org/3/library/operator.html#operator.pow "(in Python v3.7)") * [`operator.rshift()`](https://docs.python.org/3/library/operator.html#operator.rshift "(in Python v3.7)") * [`operator.sub()`](https://docs.python.org/3/library/operator.html#operator.sub "(in Python v3.7)") * [`operator.truediv()`](https://docs.python.org/3/library/operator.html#operator.truediv "(in Python v3.7)") * [`operator.xor()`](https://docs.python.org/3/library/operator.html#operator.xor "(in Python v3.7)") ## 3.5.5。 Numpy 支持 由于 CUDA 編程模型,內核內的動態內存分配效率低下且通常不需要。 Numba 不允許任何內存分配功能。這會禁用大量 NumPy API。為了獲得最佳性能,用戶應編寫代碼,以便每個線程一次處理單個元素。 支持的 numpy 功能: * 訪問 &lt;cite&gt;ndarray&lt;/cite&gt; 屬性 &lt;cite&gt;.shape&lt;/cite&gt; , &lt;cite&gt;.strides&lt;/cite&gt; , &lt;cite&gt;.ndim&lt;/cite&gt; , &lt;cite&gt;.size&lt;/cite&gt; 等。 * 標量 ufuncs 在&lt;cite&gt;數學&lt;/cite&gt;模塊中具有等價物;即`np.sin(x[0])`,其中 x 是 1D 陣列。 * 索引和切片工作。 不受支持的 numpy 功能: * 數組創建 API。 * 數組方法。 * 返回新數組的函數。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看