04 2020 档案

摘要:1.使用hip实现矩阵乘 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 #include <hip/hip_runtime.h> 5 #include <hip/hip_runtime_api.h> 6 7 #define M 4 8 #define 阅读全文

posted @ 2020-04-17 14:35 无人知晓LLH 阅读(2760) 评论(0) 推荐(0)

摘要:1.两个一维数组相加,求和 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #include "cuda_runtime.h" 5 #include "device_launch_parameters.h" 6 voi 阅读全文

posted @ 2020-04-11 22:03 无人知晓LLH 阅读(357) 评论(0) 推荐(0)

摘要:1.clock()函数是C/C++中的计时函数,相关的数据类型是clock_t,使用clock函数可以计算运行某一段程序所需的时间,如下所示程序计算从10000000逐渐减一直到0所需的时间。 注:每次运行所需时间可能会不一样 1 #include "cuda_runtime.h" 2 #inclu 阅读全文

posted @ 2020-04-11 09:50 无人知晓LLH 阅读(265) 评论(0) 推荐(0)

摘要:1.第一个程序,输出hello world,1个Block块中含有5个线程 1 #include <stdio.h> 2 #include "cuda_runtime.h" 3 4 __global__ void hello(void) 5 { 6 printf("hello world from 阅读全文

posted @ 2020-04-10 13:47 无人知晓LLH 阅读(196) 评论(0) 推荐(0)

摘要:一、CPU 1.什么是CPU: 2.CPU内部的并行性 3. 阅读全文

posted @ 2020-04-10 09:31 无人知晓LLH 阅读(537) 评论(0) 推荐(0)

摘要:一、并行处理 串行处理:多个任务在处理单元上依次执行。 并行处理:多个任务在多个处理单元上同时执行 并行处理的目的: 二、多核处理器技术 多核处理器技术: 为什么要转向多核处理器:(1)Manufacturing costs and yield problems limit use of densi 阅读全文

posted @ 2020-04-08 15:20 无人知晓LLH 阅读(149) 评论(0) 推荐(0)

导航