摘要: 原文http://www.olcf.ornl.gov/training_articles/opencl-vector-addition/本文仅仅是为了学习OpenCL而做的的相关翻译。由于原文中的例子不能在我的环境中运行,因此做了一些改动。通过这个例子能很好地了解OpenCL的编程模型。1. 简介这个例子是表示了两个向量相加,可以认为是OpenCL中的"hello world"。为了使程序更容易理解,没有加入错误处理机制。//vecAdd.c#include <stdio.h>#include <stdlib.h>#include <math. 阅读全文
posted @ 2011-11-04 00:26 Let it be! 阅读(2430) 评论(0) 推荐(1) 编辑