Compiladores Intel 9.x en el procesador Intel® Core Duo™ Windows version Intel Software College.

Slides:



Advertisements
Presentaciones similares
Documentos de Construcción y Detalles
Advertisements

Autodesk® Revit® Structure Software Interfaz del Usuario
Los programas de Intel Educación son patrocinados por la Fundación Intel y la Corporación Intel. Derechos de autor © 2007, Corporación Intel. Todos los.
Los programas de Intel Educación son patrocinados por la Fundación Intel y la Corporación Intel. Derechos de autor © 2007, Corporación Intel. Todos los.
Reporting de segmento SAP Best Practices.
Libro mayor SAP Best Practices.
Crear libro de pedidos SAP Best Practices.
Crear clases de coste y grupos de clase de coste (155.05)
Crear material - Producto terminado (FERT) (Variante para material configurable) (155.30) SAP Best Practices.
Crear material - Mercadería (HAWA) (155.27)
Mantenimiento de ciclos de subrepartos (155.07)
Programando con OpenMP*
Multiplique su productividad con el uso de Tablas en AutoCAD®
Database Mounting Tool (Dsamain.exe) Mediante esta nueva herramienta y una de las mejoras de la nueva versión de Ntdsutil… podemos generar y examinar.
Proceso de renovación (Trabajo en curso)
Copyright © 2009 Intel Corporation.
Optimización de aplicaciones
Antonio Gámir Optimized Desktop Specialist Microsoft Ibérica.
11 Servidores basados en Arquitectura Intel Junio 2008 DataWarehouses de Alto Rendimiento.
Estructuras en Sistemas Operativos
Gestión de viajes SAP Best Practices.
Plan trimestral: previsión de cantidades de ventas con CO-PA
Orden CO para planificación de marketing y otros gastos generales
Crear Registro Maestro de Modificación (155.32)
Oferta de aprovisionamiento SAP Best Practices. ©2013 SAP AG. All rights reserved.2 Objetivo, ventajas y etapas clave del proceso Objetivo  Petición.
Join us on Twitter: #AU2013 Acelerando los flujos de trabajo de simulación dinámica y animaciones a través de la nueva herramienta Joint en Autodesk® Inventor®
Lenguaje C.
INTEL CONFIDENTIAL Metodología de programación paralela Intel Software College.
Programación en los procecesadores Intel® Multi Core.
INTEL CONFIDENTIAL Paralelizando para mejorar el rendimiento con Intel® Threading Building Blocks Sesión:
Usando Tablas de Planificación y Espacios para Calcular Cargas de Calefacción con Autodesk® Revit MEP® 2012 Pedro Rivera Diseñador Mecánico/Coordinador.
Los programas de Intel Educación son patrocinados por la Fundación Intel y la Corporación Intel. Derechos de autor © 2007, Corporación Intel. Todos los.
Análisis de Algoritmos
Organización del Computador I Verano MIPS (1 de 2) Basado en el capítulo 3 del libro de Patterson y Hennessy Verano 2004 Profesora Borensztejn.
Introducción a la Programación. Lenguaje de Máquina.
Autodesk® Navisworks® : Simulación 4D con Autodesk® Revit® 2013 y MS Project® 2010 Paulo K. Ogino A. Arquitecto / Académico / Autodesk Consulting Specialist.
Crear número de serie/equipo (155.36)
Programación de Memoria Compartida
Tratamiento de pedidos de cliente con facturación colectiva
© 2012 Autodesk Aplicaciones móviles en Autodesk® Infrastructure Map Server Luis Carrión Pérez Gerente General de GIS Networks SAC – Perú Instructor para.
1 Asignación Dinámica de Memoria Agustín J. González Versión original de Kip Irvine ELO 329.
Programación con OpenMP* Intel Software College. Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or.
Programming with POSIX* Threads Intel Software College.
Patrones de Programación Paralela Sesión:. Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered.
Los programas de Intel Educación son patrocinados por la Fundación Intel y la Corporación Intel. Derechos de autor © 2007, Corporación Intel. Todos los.
Elementos de Intel ® Educar - Introducción. 2 Programa Intel ® Educar Derechos de autor © 2010, Corporaci ó n Intel. Todos los derechos reservados. Todos.
Estructuras en Sistemas Operativos DAISY KATERINE RODRÍGUEZ.
Conceptos básicos de procesamiento en procecesadores Intel® Multi Core.
Programando con Hilos POSIX* Intel Software College.
Introducción al Lenguaje. ¿ Qué es PHP ? O Hypertext Pre-processoes (PHP) es un lenguaje de "código abierto" interpretado, de alto nivel, embebido en.
Gestión de caja SAP Best Practices. ©2013 SAP AG. All rights reserved.2 Objetivo, ventajas y etapas clave del proceso Objetivo  El resumen de la posición.
Gestión de números de serie
CARACTERÍSTICAS Es un lenguaje de programación estructurado de propósito general. Está estrechamente asociado al sistema operativo UNIX, ya que el propio.
1 Asignación Dinámica de Memoria Agustín J. González ELO 329.
Gestión de inflación SAP Best Practices.
Derechos de autor © 2008, Corporación Intel. Todos los derechos reservados. Intel e Intel  Educación son marcas comerciales o marcas registradas de la.
Registro de tiempo SAP Best Practices. ©2013 SAP AG. All rights reserved.2 Objetivo, ventajas y etapas clave del proceso Objetivo  La hoja de horas de.
Hilos Capítulo 5 Silberschatz Galvin. Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered.
Gestión de oportunidades para sectores de servicios
Mantenimiento interno SAP Best Practices. ©2013 SAP AG. All rights reserved.2 Objetivo, ventajas y etapas clave del proceso Objetivo  Este escenario.
Introducción a VTune™ Analizador de rendimiento
Derechos de autor © 2008, Corporación Intel. Todos los derechos reservados. Intel e Intel  Educación son marcas comerciales o marcas registradas de la.
Derechos de autor © 2008, Corporación Intel. Todos los derechos reservados. Intel e Intel  Educación son marcas comerciales o marcas registradas de la.
MEMORIA DINÁMICA.
Cálculo del coste por componente de simulación
Contabilidad de coste de ventas
Agenda  Historia  Características  Mecanismos de concurrencia  Ejemplos  Desventajas  Accesibilidad  Conclusiones  Bibliografía.
DML Transact SQL Sesión X Triggers. Duración 2 Horas.
Proceso de renovación (material fabricado en stock) SAP Best Practices.
Orden CO para marketing y otros gastos generales reales SAP Best Practices.
Transcripción de la presentación:

Compiladores Intel 9.x en el procesador Intel® Core Duo™ Windows version Intel Software College

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 2 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Objetivos Al término de este módulo será capaz de: Usar las optimizaciones importantes del compilador Optimizar software para la arquitectura Aumentar el rendimiento con vectorización y otras técnicas

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 3 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Agenda Introducción Parámetros del Compilador Dual Core Vectorización

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 4 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Clave Para Optimizar: Intel ® Core™ Duo Explotar el poder de la arquitectura requiere compiladores sofisticados Uso óptimo de los Registros y unidades funcionales Dual-Core/Multi-processor Instrucciones SSE Arquitectura de la cache

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 5 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Compatibilidad de C++ con Microsoft Fuentes y binarios compatibles con VC2003 con /Qvc71, Fuentes y binarios compatibles con w/ VC 2005 bajo /Qvc8. Binarios de Microsoft* e Intel OpenMP no son compatibles. Use el compilador adecuado para todos los módulos compilados con OpenMP Para mayor información, refiera al manual de usuario

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 6 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Usar el compilador de Intel en Microsoft IDE C++

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 7 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Agenda Introducción Parámetros del Compilador Compilador Intel® C++ Dual Core Vectorización

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 8 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Optimizaciones Generales Windows*Linux*Mac* /Od-O0 Deshabilita optimizaciones /Zi-g Crea símbolos /O1-O1 Optimiza para el tamaño del binario: Código Servidor /O2-O2 Optimiza para velocidad (default) /O3-O3 Optimiza para Caché de Datos: Código de Punto Flotante Cíclico

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 9 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Optimización Multi-pass Optimizaciones Interprocedurales (IPO) ip: Habilita optimizaciones interprocedurales para la compilación de un archivo ipo: Habilita optimizaciones interprocedurales a través de archivos Las funciones “inline” pueden estar en archivos aparte Mejora la optimización cuando se usan en combinación con otras facilidades de compilador Windows*Linux*Mac* /Qip-ip /Qipo-ipo

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 10 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Optimización Multi-paso - IPO Uso: Proceso de dos pasos Encadenando Windows*icl /Qipo main.o func1.o func2.o Linux*icc -ipo main.o func1.o func2.o Mac*icc -ipo main.o func1.o func2.o Paso 1 Paso 2 virtual.o ejecutable Compilando Windows*icl -c /Qipo main.c func1.c func2.c Linux*icc -c -ipo main.c func1.c func2.c Mac*icc -c -ipo main.c func1.c func2.c

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 11 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Optimizaciones Personalizadas PGO (Profile Guided Optimizations) Usa el resultado de una ejecución para guiar otras optimizaciones del compilador Ayuda para manejo de la cache, paginación, predicción de saltos Optimizaciones Habilitadas: Ordenamiento básico de bloques Mejor asignación de registros Mejor decisión de las funciones para “inline” Ordenamiento de funciones Optimización en el enunciado de parámetros Mejores decisiones de vectorización

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 12 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Compilación Instrumentada (Mac*/Linux*)icc -prof_gen[x] prog.c (Windows*)icl -Qprof_gen[x] prog.c Ejecución Instrumentada Ejecuta el programa con un conjunto de datos típico Compilación Retroalimentada (Mac/Linux)icc -prof_use prog.c (Windows)icl -Qprof_use prog.c Archivo DYN que contiene información dinámica:.dyn Ejecutable Instrumentado Archivo de resumen DYN fusionado:.dpi Elimina archivos dyn files viejos sin no queremos la info incluída Paso 1 Paso 2 Paso 3 Optimización Multi Pasos PGO: Proceso de Tres Pasos

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 13 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Agenda Introducción Parámetros del Compilador Dual Core Auto Paralelización OpenMP Diagnósticos de Paralelización Vectorización

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 14 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Auto-paralelización Auto-paralelización: Paralelización automática de ciclos sin necesidad de insertar directivas de OpenMP*. El compilador puede “fácilmente” identificar candidatos a la paralelización, pero las aplicaciones grandes son difíciles de analizar. Windows*Linux*Mac* /Qparallel-parallel /Qpar_report[n]-par_report[n]

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 15 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Teconolgía de Paralelización OpenMP* Aproximación basada en Pragma para paralelizar Uso: Parámetros de OpenMP : -openmp : /Qopenmp Reportes de OpenMP : - openmp-report : /Qopenmp-report #pragma omp parallel for for (i=0;i<MAX;i++) A[i]= c*A[i] + B[i];

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 16 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version OpenMP: Ejemplo de Extensión “Workqueueing” Extensión “Workqueuing” del compilador de Intel Crea Cola de tareas…Trabaja en… Funciones recursivas Listas encadenadas, etc. #pragma intel omp parallel taskq shared(p) { while (p != NULL) { #pragma intel omp task captureprivate(p) do_work1(p); p = p->next; }

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 17 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Diagnósticos (Parallel Diagnostics) Instrumentación del Fuente para Intel Thread Checker Permite al thread checker diagnosticar errores en la paralelización Para usar tcheck/Qtcheck es necesario tener instalado el Intel Thread Checker Ver documentación del thread checker mancetools/sb/CS htm Windows*Linux*Mac* /Qtcheck-tcheckNo support

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 18 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Agenda Introducción Parámetros del Compilador Dual Core Vectorización SSE y Vectorización Reportes de Vectorización Explicaciones de algunos inhibidores de vectorización específicos

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 19 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Soporte SIMD – SSE, SSE2, SSE3 16x bytes 8x words 4x dwords 2x qwords 1x dqword 4x floats 2x doubles MMX* SSE SSE2 SSE3 * MMX actualmente utiliza los Registros de Punto Flotante del x87 - SSE, SSE2, y SSE3 usan los nuevos registros SSE

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 20 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version SIMD FP usando formato AOS* Sincronización de hilos Codificación de vídeo Aritmética compleja Conversiones FP a entero HADDPD, HSUBPD HADDPS, HSUBPS MONITOR, MWAIT LDDQU ADDSUBPD, ADDSUBPS, MOVDDUP, MOVSHDUP, MOVSLDUP FISTTP * AOS ( Array Of Structures) Also benefits Complex and Vectorization Instrucciones SSE3

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 21 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Usando SSE3 - Tarea: Convertir Esto… 128-bit Registers A[0] B[0] C[0] A[1] B[1] C[1] no usado for (i=0;i<=MAX;i++) c[i]=a[i]+b[i];

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 22 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version … En Esto … 128-bit Registers A[3] A[2] B[3] B[2] C[3] C[2] + + A[1] A[0] B[1] B[0] C[1] C[0] + + for (i=0;i<=MAX;i++) c[i]=a[i]+b[i];

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 23 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Vectorización Basada en el Compilador Específica del Procesador DescripciónUsoWindows*Linux*Mac* Genera instrucciones y optimiza para procesadores compatibles con Intel ® Pentium ® 4 incluyendo MMX, SSE y SSE2. W/QxW-xWNo aplica Genera instrucciones y optimiza para procesadores Intel ® con soporte para SSE3 incluyendo Core Duo. Estos procesadores soportan SSE3 as í como MMX, SSE y SSE2. P/QxP /QaxP -xP, -axP Vector- izaci ó n occure por default

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 24 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Vectorización Basada en el Compilador Despacho Automático del Procesador – ax[?] Un solo ejecutable Optimizado para procesadores Intel® Core y código genérico que corre en todos los procesadores IA32. Para cada procesador objeto utiliza: Instrucciones específicas del procesador Vectorización Baja sobrecarga Algunos incrementan en tamaño del código

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 25 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Por qué los Ciclos no se Vectorizan Independencia Las iteraciones de los ciclos generalmente deben ser independientes Algunos calificadores relevantes: Algunos ciclos dependientes pueden vectorizarse La mayoría de llamadas a funciones no pueden vectorizarse. Algunos saltos condicionales previenen la vectorización. Los ciclos deben ser contables. En ciclos anidados, los ciclos de fuera no pueden vectorizarse. Tipos de datos mezclados no pueden vectorizarse.

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 26 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version ¿Por Qué no fue Vectorizado mi Ciclo? Windows* Linux* Macintosh* -Qvec_reportn-vec_reportn-vec_reportn Establece niveles de diagnóstico enviados a stdout n=0: Sin información de diagnóstico n=1: (Default) Los ciclos fueron vectorizados exitosamente “Loops successfully vectorized” n=2: Ciclos no vectorizados – y la razón de porque no n=3: Añade información de dependencia n=4: Reporta solo ciclos no-vectorizados n=5: Reporta ciclos no-vectorizados y añade información de dependencias

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 27 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Por qué los Ciclos no se Vectorizan “Existencia de dependencia en vectores” “Unidad de pasos (unit stride) no usada” “Tipos de Datos Mezclados” “Estructura de Ciclo no Soportada” “Contiene una sentencia no-vectorizable en la línea XX” Hay más razones por las cuales los ciclos no se vectorizan pero se discutiremos las razones aquí descritas

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 28 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version “Existencia de Dependencia en Vectores” Usualmente, indica una dependencia real entre iteraciones del ciclo como aquí se muestra: for (i = 0; i < 100; i++) x[i] = A * x[i + 1];

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 29 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Definiendo Independencia en Ciclos Iteración Y de un ciclo es independiente de cuando (o si) la iteración X ocurre. int a[MAX], b[MAX]; for (j=0;j<MAX;j++) { a[j] = b[j]; }

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 30 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version “Unidad de Pasos (Unit Stride) No Usada” for (I=0;I<=MAX;I++) for (J=0;J<=MAX;J++) { c[I][J]+=1; // Unit Stride c[J][I]+=1; // Non-Unit A[J*J]+=1; // Non-unit A[B[J]]+=1; // Non-Unit if (A[MAX-J])=1 last1=J;}// Non-Unit Resultado Final: Cargar el Vector puede llevar más ciclos que ejecutar la operación secuencialmente. Memoria

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 31 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version “Tipos de Datos Mezclados” Ejemplo: int howmany_close(double *x, double *y) { int withinborder=0; double dist; for(int i=0;i<MAX;i++) { dist=sqrtf(x[i]*x[i] + y[i]*y[i]); if (dist<5) withinborder++; } Son posibles tipos de datos mezclados – pero complican las cosas ejemplo: 2 dobles vs 4 enteros por registro SIMD Algunas operaciones con tipos de datos específicos no funcionarán

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 32 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version “Estructura del Ciclo No-Soportada” Ejemplo: struct _xx { int data; int bound; } ; doit1(int *a, struct _xx *x) { for (int i=0; i bound; i++) a[i] = 0; Una estructura de ciclo no soportada significa que el ciclo no es contable, o el compilador por cualquier razón no puede construir una expresión de tiempo de ejecución para el contador.

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 33 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version “Contiene enunciado no-vectorizable” for (i=1;i<nx;i++) { B[i] = func(A[i]); } 128-bit Registers A[3] A[2] B[3] B[2] func A[1] A[0] B[1] B[0] func

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 34 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Referencia Web-based and classroom training White papers and technical notes Product support resources

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 35 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 36 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Actividad 1 - raytrace2: Compilación Inicial Establecer el ambiente y compila con ambos: Microsoft* Visual C++.NET (MSVC*) e Intel® C++ Compiler (icl)

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 37 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Actividad 2 - raytrace2: Compilación O3 Usar la optimización de alto nivel (-O3) del compilador Intel para loop centric codes

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 38 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Actividad 3 - raytrace2: Compilación IPO Usar la optimización Inter-procedural (-Qipo) del compilador Intel

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 39 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Actividad 4 - raytrace2: Compilación PGO Usar optimización personalizada (Profile-guided Optimization) del compilador de Intel

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 40 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Actividad 5 – raytrace2: Vectorización Usar optimización de vectorización (-QxP) del compilador de Intel

Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners. 41 Intel Compilers 9.x on the Intel® Core Duo™ Processor Windows version Actividad 6 - raytrace2: Usando todo simultáneamente Usa todas las optimizaciónes previas (-O3, -QxP, IPO y PGO)