资源简介
几个cuda源代码示例
1.cuda矩阵例子.cu
2.实现矩阵的乘法.cu
3....
/*****************************************************************************************/
/核心代码部分,实现了矩阵的乘法运算/核心代码部分,实现了矩阵的乘法运算
/*****************************************************************************************/
/
// Matrix multiplication kernel –thread specification
__global__ void MatrixMulKernel(Matrix M, Matrix N, Matrix P)
{
// 2D Thread ID
int tx = threadIdx.x;
int ty = threadIdx.y;
// Pvalue is used to store the element of the matrix
// that is computed by the thread
float Pvalue = 0;
// 并行计算体现在次,多个thread并行进行
// 每个thread计算一行与一列的乘积
for (int k = 0; k < M.width; ++k)
{
float Melement = M.elements[ty * M.pitch + k];
float Nelement = Nd.elements[k * N.pitch + tx];
Pvalue += Melement * Nelement;
}
// Write the matrix to device memory;
// each thread writes one element
P.elements[ty * P.pitch + tx] = Pvalue;
}

代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4190 2008-08-23 18:41 cuda code\code\cudaMallocAndMemcpy.cu
文件 2173 2008-08-23 17:45 cuda code\code\cuda矩阵例子.cu
文件 4167 2008-08-23 17:39 cuda code\code\my_first_kernel.cu
文件 1672 2008-08-26 16:20 cuda code\code\n_body.cu
文件 4321 2008-08-23 18:55 cuda code\code\reverseArry_singleblock.cu
文件 4865 2008-08-23 15:32 cuda code\code\实现矩阵的乘法.cu
目录 0 2012-07-23 17:04 cuda code\code
目录 0 2012-07-23 17:04 cuda code
----------- --------- ---------- ----- ----
21388 8
----------- --------- ---------- ----- ----
文件 4190 2008-08-23 18:41 cuda code\code\cudaMallocAndMemcpy.cu
文件 2173 2008-08-23 17:45 cuda code\code\cuda矩阵例子.cu
文件 4167 2008-08-23 17:39 cuda code\code\my_first_kernel.cu
文件 1672 2008-08-26 16:20 cuda code\code\n_body.cu
文件 4321 2008-08-23 18:55 cuda code\code\reverseArry_singleblock.cu
文件 4865 2008-08-23 15:32 cuda code\code\实现矩阵的乘法.cu
目录 0 2012-07-23 17:04 cuda code\code
目录 0 2012-07-23 17:04 cuda code
----------- --------- ---------- ----- ----
21388 8
相关资源
- x264源码及其配置文件,用于配置树莓
- NVIDIAOpticalFlowSDK-79c6cee80a2df9a196f20afd6
- MPI和CUDA在多层快速多极子中的应用
- 论文研究 - 采用多GPU计算的陡峭三维
- 利用GPU破解rar密码工具
- GPU精粹1-中文版.pdf《GPU精粹:实时图形
- eetop.cn_OpenCL.Parallel Computing on the GPU
- GPU+编程与CG+语言之阳春白雪下里巴人
- CUDA实现的图像融合算法
- MD5GPU.rar
- 数据融合代码-ESTARFM
- GPU高性能运算之CUDA源代码
- win10 vs2015 编译nms和gpunms
- CUDA实现稀疏大矩阵乘法
- GPU结构概述
- 使用CUDA做图像模湖匹配
- 深入浅出谈CUDA.
- GPU编程与CG语言之阳春白雪下里巴人
- 基于CUDA 的矩阵乘法和FFT 性能测试
- NVIDIA GPU Computing SDK
- 《GPU高性能计算之CUDA》书中源代码
- 基于D3D的YV12视频渲染 更新
- CUDA9.2及cudnn7.1 for win10
- CUDA Fortran for Scientists and Engineers[英文
- _CPU_GPU协同并行计算研究综述_cuda_op
- GPU编程与CG语言之阳春白雪下里巴人
- nVIDIA显卡CUDA性能测试工具,可测试
- CUDA的图像分割并行算法的设计与实现
- GPU gems 1 pdf
- Jetson-TX2手动安装CUDA和Cudnn.pdf
评论
共有 条评论