多核处理器和基于图形处理器通用计算(GPGPU)的发展,提出了简化并行编程的需求,而软件事务存储(STM)通过标记代码段并保证其执行的原子性为简化并行编程提供了很好的选择。为降低图形处理器(GPU)并行编程的复杂性,在分析GPU编程中存在的同步问题,结合统一计算设备架构(CUDA)的特点以及影响STM重要因素的基础上,提出在编程环境中引入STM模型的编程方法,测试结果表明相对基于CPU的计算依然具有良好的加速比。
The development of multi-core processor and GPGPU ( general purpose computing on graphics processors) creates a demand for ease of parallelization. STM (Software transactional memory ) provides a good choice to simplify the development of concurrent code by allowing the programmer to mark sections of code to be executed atomically. To simplify the relatively complex of parallel programming on GPU ( Graphics Processing Unit), synchronization problems of GPU programming are analyzed. Based on the comprehensive consideration of significant factors of STM and characteristics of CUDA (Compute Unified Device Architecture), the introduction of STM in GPU programming environment is proposed and the test results show that speedup ratio sustains well by comparison with computing on CPU.