parameters: (A, B, C)
docstring: 矩阵乘法 C = A * B
docstring_summary: 矩阵乘法 C = A * B
docstring_tokens: 矩阵乘法 C = A * B
function: def matmul(A, B, C):
      """  矩阵乘法 C = A * B
      """
      # Numba库提供了更简易的计算方法
      # x, y = cuda.grid(2)
      # 具体计算公式如下
      row = cuda.threadIdx.x + cuda.blockDim.x * cuda.blockIdx.x
      col = cuda.threadIdx.y + cuda.blockDim.y * cuda.blockIdx.y
  
  
      if row < C.shape[0] and col < C.shape[1]:
          tmp = 0.
          for k in range(A.shape[1]):
              tmp += A[row, k] * B[k, col]
          C[row, col] = tmp
function_tokens: def matmul ( A , B , C ) : # Numba库提供了更简易的计算方法 # x, y = cuda.grid(2) # 具体计算公式如下 row = cuda . threadIdx . x + cuda . blockDim . x * cuda . blockIdx . x col = cuda . threadIdx . y + cuda . blockDim . y * cuda . blockIdx . y if row < C . shape [ 0 ] and col < C . shape [ 1 ] : tmp = 0. for k in range ( A . shape [ 1 ] ) : tmp += A [ row , k ] * B [ k , col ] C [ row , col ] = tmp