MATLAB PARALLEL COMPUTING TOOLBOX - S Guía de usuario Pagina 7

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 656
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 6
vii
Reduction Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32
Basic Rules for Reduction Variables . . . . . . . . . . . . . . . . . . 2-33
Further Considerations with Reduction Variables . . . . . . . . 2-34
Example: Using a Custom Reduction Function . . . . . . . . . . 2-37
Temporary Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-39
Uninitialized Temporaries . . . . . . . . . . . . . . . . . . . . . . . . . . 2-39
Temporary Variables Intended as Reduction Variables . . . . 2-40
Improving parfor Performance . . . . . . . . . . . . . . . . . . . . . . . 2-42
Where to Create Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42
Slicing Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42
Optimizing on Local vs. Cluster Workers . . . . . . . . . . . . . . 2-42
Parallel Pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-44
What Is a Parallel Pool? . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-44
Automatically Start and Stop a Parallel Pool . . . . . . . . . . . 2-45
Alternative Ways to Start and Stop Pools . . . . . . . . . . . . . . 2-45
Pool Size and Cluster Selection . . . . . . . . . . . . . . . . . . . . . . 2-46
Convert Nested for-Loops to parfor . . . . . . . . . . . . . . . . . . . 2-48
Single Program Multiple Data (spmd)
3
Execute Simultaneously on Multiple Data Sets . . . . . . . . . . . 3-2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
When to Use spmd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Define an spmd Statement . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Display Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Access Worker Variables with Composites . . . . . . . . . . . . . . . 3-6
Introduction to Composites . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Create Composites in spmd Statements . . . . . . . . . . . . . . . . 3-6
Variable Persistence and Sequences of spmd . . . . . . . . . . . . . 3-8
Create Composites Outside spmd Statements . . . . . . . . . . . . 3-9
Distribute Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Distributed Versus Codistributed Arrays . . . . . . . . . . . . . . 3-10
Create Distributed Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Vista de pagina 6
1 2 3 4 5 6 7 8 9 10 11 12 ... 655 656

Comentarios a estos manuales

Sin comentarios