摘要: Getting aCC Error:name followed by "::" must be a class or namespace name"原始是这样子的:Using namespace stdext::hash_map;修改如下:Using namespace std; 阅读全文
posted @ 2015-03-23 17:00 青竹居士 阅读(2270) 评论(0) 推荐(0) 编辑
摘要: void acc_set_device_num( int, acc_device_t );描述在指定类型的所有设备中, acc_set_device_num 告诉运行时库环境用哪一个设备。如果 devicenum 的值为负,运行时环境将恢复到编译器自行定义的默认行为。如果第二个参数是零,选定的设备编... 阅读全文
posted @ 2015-03-23 15:45 青竹居士 阅读(806) 评论(0) 推荐(0) 编辑
摘要: getnumdevices.c代码 1 /* 文件名: getnumdevices.c 2 * 功能 : 测试函数acc_get_num_devices(.) 3 */ 4 #include 5 #include "openacc.h" 6 int main() 7 { 8 int num = -8... 阅读全文
posted @ 2015-03-23 15:28 青竹居士 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 格式C 或 C++:int acc_get_num_devices( acc_device_t );描述例程 acc_get_num_devices 返回主机上指定类型的加速器设备数量。输入参数说明对哪种类型的设备计数。 1 /* 文件名: getnumdevices.c 2 * 功能 : 测试函数... 阅读全文
posted @ 2015-03-23 15:17 青竹居士 阅读(558) 评论(0) 推荐(0) 编辑
摘要: 对 C 和 C++,本章讲述的运行时库例程的原型保存在一个名为 openacc.h 的头文件中。所有的库例程都是用“ C”连接的 extern 函数。这个文件中定义1: 本章中所有例程的原型。 这些原型中使用的所有数据类型,包括一个描述加速器类型的枚举类型。 acc_async_noval 和... 阅读全文
posted @ 2015-03-23 15:09 青竹居士 阅读(359) 评论(0) 推荐(0) 编辑
摘要: timeinfo1.c代码 1 #include 2 #define N 100 3 int main() 4 { 5 int A[N]; 6 #pragma acc kernels 7 { 8 for(int i=0; i 2 #define N 100 3... 阅读全文
posted @ 2015-03-23 14:13 青竹居士 阅读(1382) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 5 int main( int argc, char* argv[] ) 6 { 7 int n; /* size of the vector */ 8 float *restrict a; ... 阅读全文
posted @ 2015-03-23 11:25 青竹居士 阅读(596) 评论(0) 推荐(0) 编辑