Submit Search
Upload
GPars in Saga Groovy Study
•
1 like
•
827 views
Naoki Rin
Follow
佐賀Groovy勉強会のGParsの資料です。
Read less
Read more
Technology
Economy & Finance
Report
Share
Report
Share
1 of 55
Download Now
Download to read offline
Recommended
CHEP 2018: A Python upgrade to the GooFit package for parallel fitting
CHEP 2018: A Python upgrade to the GooFit package for parallel fitting
Henry Schreiner
Sea Amsterdam 2014 November 19
Sea Amsterdam 2014 November 19
GoDataDriven
DPF 2017: GPUs in LHCb for Analysis
DPF 2017: GPUs in LHCb for Analysis
Henry Schreiner
PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)
Hansol Kang
2019 IRIS-HEP AS workshop: Boost-histogram and hist
2019 IRIS-HEP AS workshop: Boost-histogram and hist
Henry Schreiner
RAMP: A System for Capturing and Tracing Provenance in MapReduce Workflows
RAMP: A System for Capturing and Tracing Provenance in MapReduce Workflows
Hyunjung Park
IRIS-HEP: Boost-histogram and Hist
IRIS-HEP: Boost-histogram and Hist
Henry Schreiner
DIANA: Recent developments in GooFit
DIANA: Recent developments in GooFit
Henry Schreiner
More Related Content
What's hot
Pyspark
Pyspark
Ajay Ohri
Tuning PostgreSQL for High Write Throughput
Tuning PostgreSQL for High Write Throughput
Grant McAlister
CMake best practices
CMake best practices
Henry Schreiner
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
Henry Schreiner
ACAT 2017: GooFit 2.0
ACAT 2017: GooFit 2.0
Henry Schreiner
05 Analysis of Algorithms: Heap and Quick Sort - Corrected
05 Analysis of Algorithms: Heap and Quick Sort - Corrected
Andres Mendez-Vazquez
Qtp Training Deepti 4 Of 4493
Qtp Training Deepti 4 Of 4493
Azhar Satti
TriHUG November Pig Talk by Alan Gates
TriHUG November Pig Talk by Alan Gates
trihug
An Overview of Hadoop
An Overview of Hadoop
Asif Ali
하이퍼커넥트 데이터 팀이 데이터 증가에 대처해온 기록
하이퍼커넥트 데이터 팀이 데이터 증가에 대처해온 기록
Jaehyeuk Oh
Extending Python, what is the best option for me?
Extending Python, what is the best option for me?
Codemotion
RDM 2020: Python, Numpy, and Pandas
RDM 2020: Python, Numpy, and Pandas
Henry Schreiner
Heaps
Heaps
IIUM
PEARC17: Modernizing GooFit: A Case Study
PEARC17: Modernizing GooFit: A Case Study
Henry Schreiner
PyHEP 2019: Python Histogramming Packages
PyHEP 2019: Python Histogramming Packages
Henry Schreiner
Upgrading To The New Map Reduce API
Upgrading To The New Map Reduce API
Tom Croucher
ROOT 2018: iminuit and MINUIT2 Standalone
ROOT 2018: iminuit and MINUIT2 Standalone
Henry Schreiner
PyHEP 2019: Python 3.8
PyHEP 2019: Python 3.8
Henry Schreiner
mruby-rr: Time Traveling Debugger For mruby Using rr
mruby-rr: Time Traveling Debugger For mruby Using rr
鈺翔 林
確率的プログラミングライブラリEdward
確率的プログラミングライブラリEdward
Yuta Kashino
What's hot
(20)
Pyspark
Pyspark
Tuning PostgreSQL for High Write Throughput
Tuning PostgreSQL for High Write Throughput
CMake best practices
CMake best practices
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
ACAT 2017: GooFit 2.0
ACAT 2017: GooFit 2.0
05 Analysis of Algorithms: Heap and Quick Sort - Corrected
05 Analysis of Algorithms: Heap and Quick Sort - Corrected
Qtp Training Deepti 4 Of 4493
Qtp Training Deepti 4 Of 4493
TriHUG November Pig Talk by Alan Gates
TriHUG November Pig Talk by Alan Gates
An Overview of Hadoop
An Overview of Hadoop
하이퍼커넥트 데이터 팀이 데이터 증가에 대처해온 기록
하이퍼커넥트 데이터 팀이 데이터 증가에 대처해온 기록
Extending Python, what is the best option for me?
Extending Python, what is the best option for me?
RDM 2020: Python, Numpy, and Pandas
RDM 2020: Python, Numpy, and Pandas
Heaps
Heaps
PEARC17: Modernizing GooFit: A Case Study
PEARC17: Modernizing GooFit: A Case Study
PyHEP 2019: Python Histogramming Packages
PyHEP 2019: Python Histogramming Packages
Upgrading To The New Map Reduce API
Upgrading To The New Map Reduce API
ROOT 2018: iminuit and MINUIT2 Standalone
ROOT 2018: iminuit and MINUIT2 Standalone
PyHEP 2019: Python 3.8
PyHEP 2019: Python 3.8
mruby-rr: Time Traveling Debugger For mruby Using rr
mruby-rr: Time Traveling Debugger For mruby Using rr
確率的プログラミングライブラリEdward
確率的プログラミングライブラリEdward
Recently uploaded
Digital Tools & AI in Career Development
Digital Tools & AI in Career Development
Mahmoud Rabie
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Pim van der Noll
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
UiPathCommunity
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
Michael Gough
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
Farhan Tariq
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
marketing932765
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
BookNet Canada
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
TopCSSGallery
2024 April Patch Tuesday
2024 April Patch Tuesday
Ivanti
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
Nathaniel Shimoni
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
Wes McKinney
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
Inflectra
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
itnewsafrica
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
Kaya Weers
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
João Esperancinha
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
Manik S Magar
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Mark Simos
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
Bernd Ruecker
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
Kari Kakkonen
A Framework for Development in the AI Age
A Framework for Development in the AI Age
Cprime
Recently uploaded
(20)
Digital Tools & AI in Career Development
Digital Tools & AI in Career Development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
2024 April Patch Tuesday
2024 April Patch Tuesday
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
A Framework for Development in the AI Age
A Framework for Development in the AI Age
GPars in Saga Groovy Study
1.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Groovy Map/Reduce Fork/Join with Agent DataflowVariable Dataflows DataflowQueue @Naoki Rin
2.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Twitter @Naoki Rin Map/Reduce Fork/Join Hatena id:naokirin Groovy 1 Java Agent Groovy Groovy DataflowVariable Dataflows DataflowQueue
3.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 . .1 GPars 2 Map/Reduce Fork/Join . .3 4 Agent . .5 DataflowVariable Dataflows 6 DataflowQueue ..
4.
GPars Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
5.
GPars Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Groovy DSL Groovy1.8 Agent DataflowVariable Dataflows DataflowQueue
6.
GPars Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Groovy DSL Groovy1.8 Agent Groovy DataflowVariable Dataflows DataflowQueue
7.
GPars Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Groovy DSL Groovy1.8 Agent Groovy DataflowVariable Dataflows DataflowQueue
8.
GPars Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Groovy DSL Groovy1.8 Agent Groovy DataflowVariable Dataflows DataflowQueue
9.
GPars Groovy
with GPars @Naoki Rin GPars Groovy 1.8 GPars 0.11 GPars GPars 6 Groovy Map/Reduce Fork/Join Groovy 1.8.2 GPars 0.12 GPars 0.12 Groovy gpars-0.11.jar Agent gpars-0.12.jar OK Groovy 1.8 @Grab OK DataflowVariable Dataflows DataflowQueue GPars 0.12
10.
GPars 6 Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
11.
GPars 6 Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Stm Agent Groovy CSP DataflowVariable Dataflows DataflowQueue
12.
GPars 6 Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Stm Agent Groovy CSP DataflowVariable Dataflows DataflowQueue
13.
GPars 6 Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Stm Agent Groovy CSP DataflowVariable Dataflows 4 DataflowQueue
14.
Groovy
with GPars @Naoki Rin GPars (Data Parallelism) GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
15.
Groovy
with GPars @Naoki Rin GPars (Data Parallelism) GPars GPars 6 Go! Map/Reduce Fork/Join ( ) Go! Map/Reduce Go! Agent Map/Reduce Fork/Join Go! DataflowVariable Dataflows Fork/Join DataflowQueue
16.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Groovy Map/Reduce Fork/Join GParsPool - JSR-166y(ParallelArray) DSL Agent GParsExecutorsPool - DataflowVariable Java Executor Dataflows DataflowQueue
17.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 import groovyx.gpars.GParsPool Map/Reduce Fork/Join . GParsPool.withPool { assert ([2, 3, 4, 5]== [1, 2, 3, 4].collectParallel {it + 1}) } . Agent withPool collectParallel() collect DataflowVariable Dataflows DataflowQueue .. .
18.
xxxParallel Groovy
with GPars @Naoki Rin GPars withPool xxxParallel() GPars GPars 6 Map/Reduce Fork/Join withPool xxx findAll() findAllParallel() import groovyx.gpars.GParsPool Agent GParsPool.withPool { assert ([1, 2, 3, 4 ].findAll{it % 2 == 0} DataflowVariable Dataflows == [1, 2, 3, 4 ].findAllParallel{it % 2 == 0}) DataflowQueue } .
19.
xxxParallel Groovy
with GPars @Naoki Rin GPars GPars GParsPool.withPool GPars 6 Map/Reduce Fork/Join anyParallel() findParallel() collectParallel() foldParallel() countParallel() grepParallel() eachParallel() groupByParallel() eachWithIndexParallel() maxParallel() Agent everyParallel() minParallel() findAllParallel() splitParallel() DataflowVariable Dataflows DataflowQueue findAnyParallel() sumParallel()
20.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 withPool Map/Reduce Fork/Join import groovyx.gpars.GParsPool . GParsPool.withPool(10) { // } Agent withPool . +1 DataflowVariable Dataflows DataflowQueue .. .
21.
Groovy
with GPars @Naoki Rin GPars GPars withPool GPars 6 . import groovyx.gpars.ParallelEnhancer Map/Reduce def list = [4, 1, 5, 3, 2 ] Fork/Join ParallelEnhancer.enhanceInstance(list) assert (list.findParallel {it == 3} == 3) . Parallel import groovyx.gpars.GParsPool Agent .GParsPool.withPool{ . . def data = (1..3).makeConcurrent() DataflowVariable Dataflows assert( data.collect {it ** 2} == [1, 4, 9] ) DataflowQueue } .
22.
(
) Groovy with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join GParsPool.withPool() { Future result = {it * 2}.callAsync(3) assert 6 == result.get() .} Agent withPool callAsync() . Future get() DataflowVariable Dataflows DataflowQueue .. .
23.
Map/Reduce Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Map/Reduce Fork/Join GPars map / Agent reduce map ( DataflowVariable Dataflows ) DataflowQueue
24.
GPars
Map/Reduce Groovy with GPars @Naoki Rin GPars GPars GPars Map/Reduce Parallel Array GPars 6 Map/Reduce Parallel Array Fork/Join parallel Parallel Array getParallel() Parallel Agent Array DataflowVariable Parallel Array Map Dataflows DataflowQueue collection
25.
Map/Reduce Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join map() Parallel Array(AbstractPAWrapper) reduce() T filter() Parallel Array(AbstractPAWrapper) size() int sum() T Agent min() T max() T DataflowVariable sort() Parallel Array(AbstractPAWrapper) Dataflows DataflowQueue groupBy() Map combine() Map
26.
Map/Reduce Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map . GParsPool.withPool { Map/Reduce println (”Hello World”.parallel Fork/Join .map{[it, 1]} .combine(0) { sum, value -> sum + value} .getParallel() .sort{-it.value} .collection) } Agent . DataflowVariable Dataflows [l=3, o=2, H=1, e=1, W=1, =1, d=1, r=1] DataflowQueue
27.
Fork/Join Groovy
with GPars @Naoki Rin GPars fork GPars GPars 6 Map/Reduce Fork/Join join fork Agent DataflowVariable Dataflows DataflowQueue
28.
Fork/Join Groovy
with GPars @Naoki Rin GPars GPars GPars 6 forkOffChild() - Map/Reduce Fork/Join runChildDirectly() - GPars 0.12 Agent getChildrenResults() - fork DataflowVariable runForkJoin() - Dataflows DataflowQueue withPool Fork/Join
29.
Fork/Join Groovy
with GPars @Naoki Rin GPars GPars fibonacci GPars 6 . import groovyx.gpars.GParsPool Map/Reduce Closure fib = {number -> if (number <= 2) { Fork/Join return 1 } forkOffChild(number - 1) final def result = runChildDirectly(number - 2) return (Integer) getChildrenResults().sum() + result } Agent GParsPool.withPool { DataflowVariable assert 55 == GParsPool.runForkJoin(10, fib) Dataflows DataflowQueue } .
30.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
31.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
32.
GPars Groovy
with GPars @Naoki Rin GPars GPars . GPars 6 import static groovyx.gpars.actor.Actors.* def console = actor { // Map/Reduce Fork/Join loop { react {msg -> println msg } } } Agent . console.send ’Hello World!’ // DataflowVariable Dataflows DataflowQueue Hello World
33.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 1 import static groovyx.gpars.actor.Actors.* Map/Reduce Fork/Join . def console = actor { react {msg -> println msg } } Agent react . react DataflowVariable Dataflows DataflowQueue
34.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join console.send ’Hello World!’ // console ’Hello World!’ // . console << ’Hello World!’ // console.call ’Hello World!’ // Agent . DataflowVariable Dataflows DataflowQueue .. .
35.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 . import static groovyx.gpars.actor.Actors.* Map/Reduce Fork/Join def console = actor { loop{ react {msg -> println msg } } Agent } . loop react DataflowVariable Dataflows DataflowQueue
36.
reactor Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce reactor Fork/Join import static groovyx.gpars.actor.Actors.* def console = reactor { // } . actor{loop{react{ }}} reactor{} Agent . DataflowVariable Dataflows DataflowQueue .. .
37.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join console.send ’Hello!’ console.send ’Hello!!’ . console.stop() console.join() join() . Agent DataflowVariable Dataflows DataflowQueue .. .
38.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce def console = reactor {reply it.reverse()} Fork/Join assert ’Hello!’ == console.sendAndWait(’ !olleH’) . reply sendAndWait() . Agent .. . DataflowVariable Dataflows DataflowQueue
39.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 def parrot = reactor { . Map/Reduce println ’Parrot: ’ + it Fork/Join sender.send it } def mary = actor { println ’Mary: Hello!’ parrot.send ’Hello!’ Agent react{println ’Mary: Good!’} } . DataflowVariable Dataflows sender DataflowQueue
40.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
41.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 ( ) Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
42.
GPars Groovy
with GPars @Naoki Rin GPars GPars GPars 6 . import groovyx.gpars.GParsPool import groovyx.gpars.agent.Agent Map/Reduce Fork/Join def agent = new Agent(1) GParsPool.withPool { (1..10).eachParallel {value -> agent {updateValue(it * value)} } } Agent println agent.val . DataflowVariable Dataflows DataflowQueue 3628800
43.
Agent Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Agent import groovyx.gpars.agent.Agent Map/Reduce . Fork/Join def intAgent = new Agent(0) def stringAgent = new Agent<String>() assert 0 == intAgent.val . Agent Agent Groovy DataflowVariable Dataflows .val DataflowQueue .. .
44.
Groovy
with GPars @Naoki Rin GPars GPars . GPars 6 import groovyx.gpars.agent.Agent def jvmLangList = new Agent<List<String>>() Map/Reduce Fork/Join jvmLangList {updateValue([’Java’])} jvmLangList.send {it << ’Scala’} jvmLangList.call {it.add ’Clojure’} jvmLangList jvmLangList.val + ’Groovy’ assert [’Java’, ’Scala’, ’Clojure’, ’Groovy’] . == jvmLangList.val Agent updateValue() DataflowVariable Dataflows DataflowQueue
45.
Groovy
with GPars @Naoki Rin . GPars GPars def members = new Agent([’Jones’]) GPars 6 final Thread t1 = Thread.start { members {it.add ’Bob’} Map/Reduce members {it.add ’Davis’} Fork/Join } final Thread t2 = Thread.start { members {it.add ’Alice’} members {it.remove(0)} } Agent // [Jones, Bob, Davis, Alice] . members.valAsync {println it} DataflowVariable .val Dataflows DataflowQueue valAsync() valAsync()
46.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
47.
(
) Groovy with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
48.
GPars
Dataflow Groovy with GPars @Naoki Rin GPars . GPars GPars 6 import groovyx.gpars.dataflow.Dataflow import groovyx.gpars.dataflow.DataflowVariable Map/Reduce final def x = new DataflowVariable() Fork/Join final def y = new DataflowVariable() final def z = new DataflowVariable() Dataflow.task { z << x.val + y.val } Dataflow.task { x << 5 } Dataflow.task { y << 10 } Agent . println z.val DataflowVariable Dataflows DataflowQueue 15
49.
DataflowVariable Groovy
with GPars @Naoki Rin GPars GPars . DataflowVariable GPars 6 import static groovyx.gpars.dataflow.Dataflow.task import groovyx.gpars.dataflow.DataflowVariable Map/Reduce Fork/Join final def x = new DataflowVariable() final def y = new DataflowVariable() task{y << x.val + 1} task{x << 1} . Agent assert 2 == y.val DataflowVariable DataflowVariable Dataflows DataflowQueue Dataflow.task task
50.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 . import static groovyx.gpars.dataflow.Dataflow.task import groovyx.gpars.dataflow.DataflowVariable Map/Reduce Fork/Join def x = new DataflowVariable() def y = new DataflowVariable() task {x << y.val} task {y << x.val} Agent println x.val // ! . DataflowVariable Dataflows DataflowQueue
51.
Dataflows Groovy
with GPars @Naoki Rin GPars GPars Dataflows GPars 6 . import static groovyx.gpars.dataflow.Dataflow.task import groovyx.gpars.dataflow.Dataflows Map/Reduce Fork/Join final def dfs = new Dataflows() task {dfs[0] = dfs.x + ” ” + dfs.y} task {dfs.y = ”Groovy!”} task {dfs.x = ”Hello”} assert ”Hello Groovy!” == dfs[0] . Agent Dataflows DataflowVariable DataflowVariable Dataflows DataflowQueue
52.
DataflowQueue Groovy
with GPars @Naoki Rin GPars GPars GPars 6 DatafowQueue . import groovyx.gpars.dataflow.DataflowQueue Map/Reduce Fork/Join final def queue = new DataflowQueue() queue << ’a’ queue << ’b’ queue << ’c’ assert ’a’ == queue.val Agent assert ’b’ == queue.val assert ’c’ == queue.val . DataflowVariable DataflowQueue Dataflows DataflowQueue .val
53.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join GPars Groovy Agent DataflowVariable Dataflows DataflowQueue
54.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Groovy http://gihyo.jp/book/2011/978-4-7741-4727-7 GPars Users Guide http://gpars.org/0.12/guide/index.html Agent GPars Javadoc DataflowVariable http://gpars.org/0.12/javadoc Dataflows DataflowQueue
55.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
Download Now