Aptech社国内正規販売代理店 インフォーマティック(株) [Home] [Bottom] [戻る] 動作環境・価格 お問い合わせ・注文 ******************************************* Announcing: GAUSS Mathematical and Statistical Systemェ 9.0 Divide and Conquer with Multi-Threading! *******************************************
GAUSSェ 9.0 features new threading functions that will allow you to take advantage of the power of multi-core, multi-processor, and hyper-threaded systems. By dividing your code into separate threads that run simultaneously to make use of multiple processors, you can dramatically reduce the time needed to run your code. Also included in GAUSS 9.0 is more support for arrays. More mathematical functions can now handle arrays.
GAUSS Mathematical and Statistical Systemェ 9.0
With GAUSS 9.0, you have the tools that you
need in order to harness the power and speed of multi-core, multi-processor,
and hyper-threaded systems! GAUSS 9.0 introduces new functions
for multi-threading your programs.
Another important addition is increased array support in more
intrinsics and operators. This allows you to seamlessly use arrays
in more of the operators and intrinsic functions.
The new threading functions enable you to define independent sections
of your program that will run at the same time. These threads
share the same workspace and can access all of the same symbols,
procedures and keywords. You can create as many threads as you
want, allowing you to take advantage of as many processors as
you have.
Features and Enhancements
* New threading functions
* ThreadStat
* ThreadBegin
* ThreadEnd
* ThreadJoin
* Additional support for string arrays
By making use of threads in your code, you can
take better advantage of the available processors on your machine.
Dividing your code into multiple threads that run simultaneously
can reduce the overall processing time of your programs.
Below is an illustration that shows one thread set with four threads,
two that are blocks of code set off by ThreadBegin and ThreadEnd,
two that are single lines of code using ThreadStat. Each thread
processes at the same time as the other threads. Your program
waits at the ThreadJoin command for all threads to finish. When
the threads have completed, your program continues, making use
of the work the threads have done.

In the example above, this block of code could
potentially run nearly four times faster on a quad core machine
because the threads are running simultaneously.
Threads can be created virtually anywhere--in the main code, in
procedures, and in keywords. You can also create threads within
other threads. This means you can multi-thread nearly anything
you want and call it from anywhere in your program. You can multi-thread
some or all of the procedures and keywords in your libraries and
call them freely anywhere in your multi-threaded programs.
Platforms
Available now for Windows (32-bit); additional platforms to come include LINUX (32-bit and AMD 64-bit), Sun SPARC (64-bit), Windows (64-bit), Mac OS X (32-bit and 64-bit), and HP UX 11.
Example of Threaded Code
in GAUSSェ 9.0
Below is some sample code written first as a single thread, then
divided into four threads.
// Procedure
proc mloop(x,N,its,pos);
local m;
m = 0;
for i(1,its,1);
m = m + moment(x[pos:pos+N-1,.],0);
pos = pos + N;
endfor;
retp(m);
endp;
N = 4000;
x = rndn(N*N,4);
// Single-Threaded Calculation
mlp = mloop( x, N, N, 1 );
// Multi-Threaded Calculation (split into
four threads for a quad-core machine)
R = rows(x)/4;
ThreadStat m1 = mloop(x, N, N/4, 1ハハハハ);
ThreadStat m2 = mloop(x, N, N/4, 1+Rハハ);
ThreadStat m3 = mloop(x, N, N/4, 1+R*2);
ThreadStat m4 = mloop(x, N, N/4, 1+R*3);
ThreadJoin;
mtmlp = m1 + m2 + m3 + m4;
Running time trials with these calculations on a quad-core machine,
the multi-threaded calculation averaged 3.3 times faster
than the single-threaded call!
Additional examples of how to incorporate threading into programs
will be added periodically, so check back here for new examples.
[Home] [Top] お問い合わせ・注文