CUDADot[vec1,vec2]
gives the dot product of vec1 and vec2.
CUDADot[mat,vec]
gives the matrix-vector product of mat and vec.
CUDADot[mat1,mat2]
gives the matrix-matrix product of mat1 and mat2.
CUDADot
CUDADot[vec1,vec2]
gives the dot product of vec1 and vec2.
CUDADot[mat,vec]
gives the matrix-vector product of mat and vec.
CUDADot[mat1,mat2]
gives the matrix-matrix product of mat1 and mat2.
更多信息和选项
- The CUDALink application must be loaded using Needs["CUDALink`"].
- CUDADot works only on general vectors types such as "Float", "Double", ….
- CUDADot does not work on fixed vector structure types like "Float[2]", "Integer32[2]", ….
范例
基本范例 (4)
First, load the CUDALink application:
Needs["CUDALink`"]This performs matrix-matrix multiplication:
CUDADot[Table[i, {i, 10}, {j, 10}], Table[i, {i, 10}, {j, 10}]]//MatrixFormThis performs matrix-vector multiplication:
CUDADot[Table[i, {i, 10}, {j, 10}], Range[10]]//MatrixFormThis performs the dot product:
CUDADot[Range[10], Range[10]]If input is CUDAMemory, then memory is returned as output:
A = CUDAMemoryLoad[RandomReal[1, {3, 3}]];
B = CUDAMemoryLoad[RandomReal[1, {3, 3}]];This multiplies the two input memories together:
res = CUDADot[A, B]Memory is retrieved using CUDAMemoryGet:
CUDAMemoryGet[res]//MatrixFormMemory must be freed with CUDAMemoryUnload:
CUDAMemoryUnload[A, B]相关指南
-
▪
- CUDALink
文本
Wolfram Research (2010),CUDADot,Wolfram 语言函数,https://reference.wolfram.com/language/CUDALink/ref/CUDADot.html.
CMS
Wolfram 语言. 2010. "CUDADot." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/CUDALink/ref/CUDADot.html.
APA
Wolfram 语言. (2010). CUDADot. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/CUDALink/ref/CUDADot.html 年
BibTeX
@misc{reference.wolfram_2026_cudadot, author="Wolfram Research", title="{CUDADot}", year="2010", howpublished="\url{https://reference.wolfram.com/language/CUDALink/ref/CUDADot.html}", note=[Accessed: 19-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_cudadot, organization={Wolfram Research}, title={CUDADot}, year={2010}, url={https://reference.wolfram.com/language/CUDALink/ref/CUDADot.html}, note=[Accessed: 19-August-2026]}