----赖格英-----

记忆不好了,记录工作中的点点滴滴....

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  并行计算

摘要:现在多数设备、计算机都有多个CPU单元,即使是手机也是多核的。但要在开发中使用多核的优势,却需要一些技巧,花费时间编写额外的代码。好了,现在可以使用Delphi做并行编程了。在Delphi、C++ Builder和RAD Studio XE7中,有一个简化并行运行任务的库,叫做并行编程库。并行编程库... 阅读全文
posted @ 2015-03-07 21:42 向北方 阅读(776) 评论(1) 推荐(0) 编辑

摘要:虽然版本号升的不大,但这也是一个重要的版本。作者发现了一个长期存在的bug,就是建立一个线程,如果不指定线程的优先级则默认设置为idle。(正确的应是Normal)看一下具体的改动情况:新功能:Added SetPriority function to the IOmniTaskConfig.Added indexed writers ([number] and [name]) to both TOmniValue and TOmniValueContainer. Bug修正:如果不指定线程优先级默认设置为Normal.Corrected swapped content of 'Sch 阅读全文
posted @ 2014-01-18 16:53 向北方 阅读(678) 评论(0) 推荐(0) 编辑

摘要:interfaceuses Classes, SysUtils;type TParallelProc = reference to procedure(i: Integer; ThreadID: Integer); TParallel = class(TThread) private FProc: TParallelProc; FThreadID: Integer; //current thread ID protected procedure Execute; override; function GetNextValue: Integer; public... 阅读全文
posted @ 2014-01-18 15:52 向北方 阅读(1262) 评论(0) 推荐(0) 编辑

摘要:OpenMP for Fortran OpenMP Directive Syntax of OpenMP compiler directive for Fortran: !$OMP DirectiveName Optional_CLAUSES... ... ... Program statements between the !$OMP lines ... are executed in parallel by all threads ... !$OMP END DirectiveName Program statements between the 2 re... 阅读全文
posted @ 2014-01-01 12:47 向北方 阅读(5621) 评论(0) 推荐(1) 编辑

摘要:Beginning OpenMPOpenMP provides a straight-forward interface to write software that can use multiple cores of a computer. Using OpenMP you can write code that uses all of the cores in a multicore computer, and that will run faster as more cores become available.OpenMP is a well-established, standard 阅读全文
posted @ 2014-01-01 12:38 向北方 阅读(2067) 评论(0) 推荐(0) 编辑

摘要:以下例子来自https://computing.llnl.gov/tutorials/openMP/exercise.html网站一、打印线程(Hello world)C******************************************************************************C FILE: omp_hello.fC DESCRIPTION:C OpenMP Example - Hello World - Fortran VersionC In this simple example, the master thread forks a ... 阅读全文
posted @ 2014-01-01 11:52 向北方 阅读(7960) 评论(0) 推荐(0) 编辑

摘要:什么是OpenMP?“OpenMP (Open Multi-Processing) is an application programming interface (API) that supports multi-platform shared memory multiprocessing programming in C, C++ and Fortran on many architectures, including Unix and Microsoft Windows platforms. It consists of a set of compiler directives, lib 阅读全文
posted @ 2014-01-01 10:24 向北方 阅读(3482) 评论(0) 推荐(0) 编辑