上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页
摘要: cat 读取文件中的全部内容。例:cat cuda_add.cu 阅读全文
posted @ 2016-01-06 11:01 秋心无波 阅读(232) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include__constant__ char p_HelloCUDA[11];__constant__ int t_HelloCUDA[11]={0,1,2,3,4,5,6,7,89,10};__constant__ int num=11;__g... 阅读全文
posted @ 2016-01-06 11:00 秋心无波 阅读(400) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #define N 100 6 7 __global__ void vecAdd(float* A,float* B,float* C){ 8 int i=threadIdx.x; 9 i... 阅读全文
posted @ 2015-12-21 14:11 秋心无波 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 最终输出实例为:0 0 1 10 0 1 12 2 3 32 2 3 3#ifndef _EXAMPLE_2_KERNEL_H_#define _EXAMPLE_2_KERNEL_H_#define SDATA( index)__global__ void testKernel( float* g_... 阅读全文
posted @ 2015-12-14 10:21 秋心无波 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 题目:给一个二维数组赋值。分析:主机端代码完成的主要功能:启动CUDA,使用多卡时应加上设备号,或使用cudaSetDevice()设置GPU设备。为输入数据分配内存空间初始化输入数据为GPU分配显存,用于存放输入数据将内存中的输入数据拷贝到显存。为GPU分配显存,用于存放输出数据。调用device... 阅读全文
posted @ 2015-12-10 14:48 秋心无波 阅读(1190) 评论(0) 推荐(0) 编辑
摘要: dim3是NVIDIA的CUDA编程中一种自定义的整型向量类型,基于用于指定维度的uint3。例如:dim3 grid(num1,num2,num3);dim3类型最终设置的是一个三维向量,三维参数分别为x,y,z; 阅读全文
posted @ 2015-12-10 11:00 秋心无波 阅读(6359) 评论(0) 推荐(1) 编辑
摘要: 1100. Final StandingsTime limit: 1.0 secondMemory limit: 16 MBOld contest software uses bubble sort for generating final standings. But now, there are too many teams and that software works too slow. You are asked to write a program, which generates exactly the same final standings as old software, 阅读全文
posted @ 2013-12-10 17:29 秋心无波 阅读(351) 评论(0) 推荐(0) 编辑
摘要: E - Cup 2Time Limit:2000MSMemory Limit:65536KB64bit IO Format:%lld & %lluSubmitStatusDescriptionThe European Cup final is coming. The past two World Cup winners, Spain and Italy, will contest the decider at Kiev's Olympic Stadium. Italy-Spain Euro final promises to be clash of polar opposite 阅读全文
posted @ 2013-12-03 10:07 秋心无波 阅读(217) 评论(0) 推荐(0) 编辑
摘要: Edward's Cola PlanTime Limit:3000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusDescriptionEdwardis a tall, handsome and rich (a.k.aGaoShuaiFu,GSF) student who studys in Zhejiang University. He also takes part in many competition ofACM-ICPC, and he is so smart that he almost wi 阅读全文
posted @ 2013-12-03 09:26 秋心无波 阅读(278) 评论(0) 推荐(0) 编辑
摘要: The Toy of Flandre ScarletTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%lld & %lluSubmitStatusDescriptionAs you know,Flandre Scarletloves her elder sisterRemilia Scarlet, and of course,RemilialovesFlandre, too. But because ofFlandre's unstable personality and incredible destructive p 阅读全文
posted @ 2013-12-03 09:22 秋心无波 阅读(298) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页