摘要:
伪代码:TopLogical(G) call DFS to compute finishtime as each vertex finished , insert it onto the front of a linked list return the linked list of ... 阅读全文
摘要:
开始学CUDA 先写一个简单的#include__global__ void add( int a, int b, int *c ) { *c = a + b;}int main(){ int c; int * dev_c; cudaMalloc((void**)&dev_c,sizeof(int));//在显存开辟空间 add>>(10,11,dev_c);//为函数分配一个block,每个block分配一个线程 cudaMemcpy(&c,dev_c,sizeof(int),cudaMemcpyDeviceToHost);//讲显存数据拷贝到内存... 阅读全文
摘要:
1.here文档here文档允许我们调用一个交互式程序;可以从脚本程序中输出大量的文本,从而不必echo每行例子1:#!/bin/bashcat<<!DATA!This is a simple use of the here document.This data is theinput given to the above cat command!DATA其输出为:This is a simple use of the here document.This data is theinput given to the above cat command例子2(与grep搜索命令的交互 阅读全文