Soumettre la recherche
Mettre en ligne
GPars in Saga Groovy Study
•
1 j'aime
•
827 vues
Naoki Rin
Suivre
佐賀Groovy勉強会のGParsの資料です。
Lire moins
Lire la suite
Technologie
Économie & finance
Signaler
Partager
Signaler
Partager
1 sur 55
Télécharger maintenant
Télécharger pour lire hors ligne
Recommandé
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
Recommandé
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
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
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
Contenu connexe
Tendances
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
Tendances
(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
Dernier
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Enterprise Knowledge
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
hans926745
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
The Digital Insurer
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
Dernier
(20)
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
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
Télécharger maintenant