High Performance Computing in C and C++
|
|
- Leon Bradley
- 7 years ago
- Views:
Transcription
1 High Performance Computing in C and C++ Rita Borgo Computer Science Department, Swansea University
2 Outline of the Module Fundamentals (High Performance Computing HPC, architectures and memory models) week 1, week 2 Fundamentals (C Language) week 1, week 2* Compiling and Debugging (C language) week 3 Fundamentals (C++) week 3, week 4 Concurrency (shared memory vs. message passing) week 5 Threads (C-language) week 4 Assignment 1 *, week 5 Message Passing Interface (MPI) week 6, week 7 Advanced (C++) week 8**, week 9 Performance analysis and prediction week 9, week 10 Heterogeneous platforms (Grid, OpenCL) week 10 Coursework 2 * *, week 11
3 Lecture 2 C FUNDAMENTALS
4 Lecture 2 - Outline Introduction to C Writing C Programs A simple C Program
5 Office Hours & Rooms Changes in: Office Hours: Monday to Friday to Rooms: Glyndwr C This change affects also Monday 15 October. I will keep you posted on Blackboard of any other change. Timetable: Friday Lecture will be moved to 4pm.
6 History of C Milestones: Martin Richards BCPL, Ken Thompson B, 1970 (used to create Unix). Dennis Ritchie, AT&T Bell Laboratories C, UNIX completely written in C. Ken Thompson and Dennis Ritchie at the PDP-11 in 1972
7 Versions of C Evolved over the years: 1972 C invented The C Programming Language published; first specification of language C89 standard (known as ANSI C or Standard C) ANSI C adopted by ISO, known as C C99 revised standard: mostly backward-compatible; not completely implemented in many compilers work on new C standard C1X (now C11) announced. In this course: ANSI/ISO C (C89/C90).
8 Characteristics of C C features: Small size (external standard library- I/0). Extensive use of function calls. Loose typing. Structured language. Few keywords. Structures, unions compound data types. Extensive use of Pointers memory, arrays. Compiles to native code. Macro preprocessor. Bitwise operations.
9 C Usage Systems programming: Operating Systems (OS) like Unix and Linux. Microcontrollers (PIC family). Embedded processors. Digital Signal Processors (DSP).
10 C vs. related languages More recent derivatives: C++, Objective C, C#. Influenced: Java, Perl, Python. C lacks: exceptions; range-checking; garbage collection object-oriented programming; polymorphism;... Low-level language => faster code (usually). Low level language => Inherently unsafe. No range checking. Limited type safety at compile time. No type checking at runtime.
11 C vs. Java Java object-oriented strongly-typed polymorphism (+, ==) classes for name space macros are external, rarely used layered I/O model C function-oriented can be overridden very limited (integer/float) (mostly) single name space, file-oriented macros common (preprocessor) byte-stream I/O
12 C vs. Java Java automatic memory management no pointers by-reference, by-value exceptions, exception handling concurrency (threads) C function calls (C++ has some support) pointers (memory addresses) common by-value parameters if (f() < 0) {error} OS signals library functions
13 C vs. Java Java length of array C on your own string as type just bytes (char []), with 0 end
14 Lecture 2 - Outline Introduction to C C Programs Workflow A simple C Program
15 Developing a C program (no IDE case) Stage 1: Creating the program. Stage 2: Compiling the program. Stage 3: Running the program.
16 WARNING In HPC most of the work is done via scripts submitted at the command line. Most of the compilation is done at command line (makefile). No real IDE. Suggestion: use an IDE like Eclipse to write/edit your program, check for errors and create a makefile. Execute your program at command line.
17 Structure of a.c file /* Begin with comments about file contents */ Insert #include statements and preprocessor definitions Function prototypes and variable declarations main() function { Function body } other_function() { Function body }
18 Stage 1: Creating the program Directly Editable Create a file containing the complete program. Use any editor you are familiar with (but please... do not use Word). Filename:.c extension (e.g. myprog.c ) Content: must obey C syntax. /* First c program */ int main(void){ printf("hello Everyone\n ); return 0; }
19 Stage 2: Compiling the program Compilers: gcc compiler (included in most Linux distributions). man gcc online manual pages on Linux. Compilation steps: Invoke the gcc command: gcc myprogram.c generates a.out executable
20 Stage 2: Compiling the program Compilation steps: Invoke the gcc command: gcc myprogram.c generates a.out Enable compiler warnings Compiler not only options: errors gcc Wall o myprogram myprogram.c generates myprogram executable Specify name of executable executable
21 Stage 3: Running the program Run your executable (Unix/Linux):./a.out./myProgram On screen: Run executable Your program results. Runtime errors (e.g. division by zero etc.).
22 C Compilation Model Preprocessor: Interprets preprocesor directives. Removes comments. Compiler: Translates source into assembly code. Assembler: Creates object code (.o extension on Unix system). Link Editor: Imports library functions. Resolves external variables references. Libraries Source Code Preprocessor Compiler Assembly Code Assembler Object Code Link Editor Executable Code
23 Lecture 2 - Outline Introduction to C Writing C Programs A Simple C Program
24 C vs. Java Java program collection of classes class containing main method is starting class running java StartClass invokes StartClass.main method JVM loads other classes as required C program: collection of functions one function main() is starting function running executable (default name a.out, platform specific) starts main function C programs are compiled into object code and then linked into executables (to allow for multiple object files and libraries to be compiled together into one program)
25 A simple C Program public class hello { } public static void main (String args []) { } System.out.println ( Hello world ); #include <stdio.h> int main(int argc, char *argv[]) { } puts( Hello, World ); return 0;
26 C control Flow blocks are enclosed in curly brackets functions are blocks main() is a function blocks have two parts: variable declaration ( data segment ) code segment in C, variables have to be declared before they are used initializations can occur at the end of the declaration section, but before the code section. #include <stdio.h> int main(int argc, char *argv[]) { } puts( Hello, World ); return 0;
27 C Libraries C is a small language (no built in I/O, no maths functions etc.). Functionalities added through libraries. Most C implementations include standard libraries. Libraries MUST be included EXPLICITLY. Example: #include -- includes contents of a named file. Files usually called header files. #include <math.h> -- standard library maths file. #include <stdio.h> -- standard library I/O file #include <stdio.h> int main(int argc, char *argv[]) { puts( Hello, World ); return 0; }
28 Simple example #include <stdio.h> int main() { printf( Hello World. \n \t and you! \n ); /* print out a message */ return 0; } $Hello World. and you! $
29 Dissecting the example #include <stdio.h> include header file stdio.h # lines processed by pre-processor No semicolon at end of pre-processor lines Lower-case letters only C is case-sensitive void main(void){ } is the only code executed printf( /* message you want printed */ ); \n = newline, \t = tab \ (escape character) in front of other special characters within printf. printf( Have you heard of \ The Muppets\? \n );
30 The main function int main() int main(int argc, char argv[]) Mentioned C just collection of functions: int main() {... } is the only code executed argc is the argument count argv is the argument vector array of strings with command-line arguments the int value is the return value convention: 0 means success, > 0 some error can also declare as void (no return value)
31 Executing a C program If no arguments int main() Name of executable:./a.out If with arguments int main(int argc, char argv[]): Name of executable + space-separated arguments./a.out 1 23 third arg argc argv 4 a.out 1 23 third arg
32 The C Compiler
33 The C compiler gcc gcc invokes C compiler gcc translates C program into executable for some target default file name a.out also cross-compilation $ gcc hello.c $ a.out Hello, World!
34 gcc Behavior controlled by command-line switches: -o file output file for object or executable -Wall all warnings use always! -c compile single module (non-main) -g insert debugging code (gdb) -p insert profiling code -l library -E preprocessor output only
35 Using gcc (or compiling your program manually) Two-stage compilation pre-process & compile: gcc c hello.c link: gcc o hello hello.o Linking several modules: gcc c a.c a.o gcc c b.c b.o gcc o hello a.o b.o Using math library gcc o calc calc.c -lm
36 Error reporting in gcc Multiple sources preprocessor: missing include files parser: syntax errors assembler: rare linker: missing libraries
37 Error reporting in gcc If gcc gets confused, hundreds of messages fix first, and then retry ignore the rest gcc will produce an executable with warnings don t ignore warnings compiler choice is often not what you had in mind Does not flag common errors like: if (x = 0) vs. if (x == 0)
38 gcc errors Produces object code for each module Assumes references to external names will be resolved later Undefined names will be reported when linking: undefined symbol _print first referenced in file program.o ld fatal: Symbol referencing errors No output written to file.
CSC230 Getting Starting in C. Tyler Bletsch
CSC230 Getting Starting in C Tyler Bletsch What is C? The language of UNIX Procedural language (no classes) Low-level access to memory Easy to map to machine language Not much run-time stuff needed Surprisingly
More informationHow To Port A Program To Dynamic C (C) (C-Based) (Program) (For A Non Portable Program) (Un Portable) (Permanent) (Non Portable) C-Based (Programs) (Powerpoint)
TN203 Porting a Program to Dynamic C Introduction Dynamic C has a number of improvements and differences compared to many other C compiler systems. This application note gives instructions and suggestions
More informationThe programming language C. sws1 1
The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan
More informationEmbedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C
Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection
More informationThe C Programming Language course syllabus associate level
TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming
More informationKITES TECHNOLOGY COURSE MODULE (C, C++, DS)
KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL
More informationLecture 22: C Programming 4 Embedded Systems
Lecture 22: C Programming 4 Embedded Systems Today s Goals Basic C programming process Variables and constants in C Pointers to access addresses Using a High Level Language High-level languages More human
More informationInformatica e Sistemi in Tempo Reale
Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)
More informationUNIX, C, C++ History, Philosophy, Patterns & Influences on modern Software Development. Alexander Schatten www.schatten.info. November 2009 ...
UNIX, C, C++ History, Philosophy, Patterns & Influences on modern Software Development Alexander Schatten www.schatten.info November 2009 Agenda Timeline C and C++ The Unix Philosophy Example: Unix and
More informationComp151. Definitions & Declarations
Comp151 Definitions & Declarations Example: Definition /* reverse_printcpp */ #include #include using namespace std; int global_var = 23; // global variable definition void reverse_print(const
More informationKeil C51 Cross Compiler
Keil C51 Cross Compiler ANSI C Compiler Generates fast compact code for the 8051 and it s derivatives Advantages of C over Assembler Do not need to know the microcontroller instruction set Register allocation
More informationC# and Other Languages
C# and Other Languages Rob Miles Department of Computer Science Why do we have lots of Programming Languages? Different developer audiences Different application areas/target platforms Graphics, AI, List
More informationINTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011
INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011 1 Goals of the Lecture Present an introduction to Objective-C 2.0 Coverage of the language will be INCOMPLETE
More informationParallel Computing. Shared memory parallel programming with OpenMP
Parallel Computing Shared memory parallel programming with OpenMP Thorsten Grahs, 27.04.2015 Table of contents Introduction Directives Scope of data Synchronization 27.04.2015 Thorsten Grahs Parallel Computing
More informationLibmonitor: A Tool for First-Party Monitoring
Libmonitor: A Tool for First-Party Monitoring Mark W. Krentel Dept. of Computer Science Rice University 6100 Main St., Houston, TX 77005 krentel@rice.edu ABSTRACT Libmonitor is a library that provides
More informationHow To Use The C Preprocessor
Environnements et Outils de Développement Cours 3 The C build process Stefano Zacchiroli zack@pps.univ-paris-diderot.fr Laboratoire PPS, Université Paris Diderot - Paris 7 URL http://upsilon.cc/~zack/teaching/1112/ed6/
More informationPart I Courses Syllabus
Part I Courses Syllabus This document provides detailed information about the basic courses of the MHPC first part activities. The list of courses is the following 1.1 Scientific Programming Environment
More informationJava Interview Questions and Answers
1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java
More informationC / C++ and Unix Programming. Materials adapted from Dan Hood and Dianna Xu
C / C++ and Unix Programming Materials adapted from Dan Hood and Dianna Xu 1 C and Unix Programming Today s goals ú History of C ú Basic types ú printf ú Arithmetic operations, types and casting ú Intro
More informationTopics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives
Introduction to Programming and Algorithms Module 1 CS 146 Sam Houston State University Dr. Tim McGuire Module Objectives To understand: the necessity of programming, differences between hardware and software,
More informationECE 341 Coding Standard
Page1 ECE 341 Coding Standard Professor Richard Wall University of Idaho Moscow, ID 83843-1023 rwall@uidaho.edu August 27, 2013 1. Motivation for Coding Standards The purpose of implementing a coding standard
More informationCOS 217: Introduction to Programming Systems
COS 217: Introduction to Programming Systems 1 Goals for Todayʼs Class Course overview Introductions Course goals Resources Grading Policies Getting started with C C programming language overview 2 1 Introductions
More informationBachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)
Unit- I Introduction to c Language: C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating
More informationHandout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.
Handout 1 CS603 Object-Oriented Programming Fall 15 Page 1 of 11 Handout 1 Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner. Java
More informationHow to Write a Simple Makefile
Chapter 1 CHAPTER 1 How to Write a Simple Makefile The mechanics of programming usually follow a fairly simple routine of editing source files, compiling the source into an executable form, and debugging
More information1/20/2016 INTRODUCTION
INTRODUCTION 1 Programming languages have common concepts that are seen in all languages This course will discuss and illustrate these common concepts: Syntax Names Types Semantics Memory Management We
More informationOverview. Lecture 1: an introduction to CUDA. Hardware view. Hardware view. hardware view software view CUDA programming
Overview Lecture 1: an introduction to CUDA Mike Giles mike.giles@maths.ox.ac.uk hardware view software view Oxford University Mathematical Institute Oxford e-research Centre Lecture 1 p. 1 Lecture 1 p.
More informationJonathan Worthington Scarborough Linux User Group
Jonathan Worthington Scarborough Linux User Group Introduction What does a Virtual Machine do? Hides away the details of the hardware platform and operating system. Defines a common set of instructions.
More informationParallel Computing. Parallel shared memory computing with OpenMP
Parallel Computing Parallel shared memory computing with OpenMP Thorsten Grahs, 14.07.2014 Table of contents Introduction Directives Scope of data Synchronization OpenMP vs. MPI OpenMP & MPI 14.07.2014
More informationCS 253: Intro to Systems Programming
CS 253: Intro to Systems Programming Spring 2014 Amit Jain, Shane Panter, Marissa Schmidt Department of Computer Science College of Engineering Boise State University Logistics Instructor: Amit Jain http://cs.boisestate.edu/~amit
More informationAn Incomplete C++ Primer. University of Wyoming MA 5310
An Incomplete C++ Primer University of Wyoming MA 5310 Professor Craig C. Douglas http://www.mgnet.org/~douglas/classes/na-sc/notes/c++primer.pdf C++ is a legacy programming language, as is other languages
More informationLecture 9. Semantic Analysis Scoping and Symbol Table
Lecture 9. Semantic Analysis Scoping and Symbol Table Wei Le 2015.10 Outline Semantic analysis Scoping The Role of Symbol Table Implementing a Symbol Table Semantic Analysis Parser builds abstract syntax
More informationC++ INTERVIEW QUESTIONS
C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get
More informationAbout The Tutorial. Audience. Prerequisites. Copyright & Disclaimer
About The Tutorial C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system.
More informationSources: On the Web: Slides will be available on:
C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,
More informationSchool of Computing and Information Sciences. Course Title: Computer Programming III Date: April 9, 2014
Course Title: Computer Date: April 9, 2014 Course Number: Number of Credits: 3 Subject Area: Programming Subject Area Coordinator: Tim Downey email: downeyt@cis.fiu.edu Catalog Description: Programming
More informationASCII Encoding. The char Type. Manipulating Characters. Manipulating Characters
The char Type ASCII Encoding The C char type stores small integers. It is usually 8 bits. char variables guaranteed to be able to hold integers 0.. +127. char variables mostly used to store characters
More informationCS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson
CS 3530 Operating Systems L02 OS Intro Part 1 Dr. Ken Hoganson Chapter 1 Basic Concepts of Operating Systems Computer Systems A computer system consists of two basic types of components: Hardware components,
More informationContents. Java - An Introduction. Java Milestones. Java and its Evolution
Contents Java and its Evolution Rajkumar Buyya Grid Computing and Distributed Systems Lab Dept. of Computer Science and Software Engineering The University of Melbourne http:// www.buyya.com Java Introduction
More informationBasic Java Constructs and Data Types Nuts and Bolts. Looking into Specific Differences and Enhancements in Java compared to C
Basic Java Constructs and Data Types Nuts and Bolts Looking into Specific Differences and Enhancements in Java compared to C 1 Contents Hello World Program Statements Explained Java Program Structure in
More information6.S096 Lecture 1 Introduction to C
6.S096 Lecture 1 Introduction to C Welcome to the Memory Jungle Andre Kessler Andre Kessler 6.S096 Lecture 1 Introduction to C 1 / 30 Outline 1 Motivation 2 Class Logistics 3 Memory Model 4 Compiling 5
More informationEmbedded Software Development
Linköpings Tekniska Högskola Institutionen för Datavetanskap (IDA), Software and Systems (SaS) TDDI11, Embedded Software 2010-04-22 Embedded Software Development Host and Target Machine Typical embedded
More informationTutorial on C Language Programming
Tutorial on C Language Programming Teodor Rus rus@cs.uiowa.edu The University of Iowa, Department of Computer Science Introduction to System Software p.1/64 Tutorial on C programming C program structure:
More informationUsing the CoreSight ITM for debug and testing in RTX applications
Using the CoreSight ITM for debug and testing in RTX applications Outline This document outlines a basic scheme for detecting runtime errors during development of an RTX application and an approach to
More informationInstall Java Development Kit (JDK) 1.8 http://www.oracle.com/technetwork/java/javase/downloads/index.html
CS 259: Data Structures with Java Hello World with the IntelliJ IDE Instructor: Joel Castellanos e-mail: joel.unm.edu Web: http://cs.unm.edu/~joel/ Office: Farris Engineering Center 319 8/19/2015 Install
More informationCSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution
CSE 452: Programming Languages Java and its Evolution Acknowledgements Rajkumar Buyya 2 Contents Java Introduction Java Features How Java Differs from other OO languages Java and the World Wide Web Java
More informationC Programming Review & Productivity Tools
Review & Productivity Tools Giovanni Agosta Piattaforme Software per la Rete Modulo 2 Outline Preliminaries 1 Preliminaries 2 Function Pointers Variadic Functions 3 Build Automation Code Versioning 4 Preliminaries
More informationLast Class: OS and Computer Architecture. Last Class: OS and Computer Architecture
Last Class: OS and Computer Architecture System bus Network card CPU, memory, I/O devices, network card, system bus Lecture 3, page 1 Last Class: OS and Computer Architecture OS Service Protection Interrupts
More informationCS 294-73 Software Engineering for Scientific Computing. http://www.cs.berkeley.edu/~colella/cs294. Lecture 25:Mixed Language Programming.
CS 294-73 Software Engineering for Scientific Computing http://www.cs.berkeley.edu/~colella/cs294 Lecture 25:Mixed Language Programming. Different languages Technical, historical, cultural differences
More informationiphone Objective-C Exercises
iphone Objective-C Exercises About These Exercises The only prerequisite for these exercises is an eagerness to learn. While it helps to have a background in object-oriented programming, that is not a
More informationC++ Programming Language
C++ Programming Language Lecturer: Yuri Nefedov 7th and 8th semesters Lectures: 34 hours (7th semester); 32 hours (8th semester). Seminars: 34 hours (7th semester); 32 hours (8th semester). Course abstract
More informationPhys4051: C Lecture 2 & 3. Comment Statements. C Data Types. Functions (Review) Comment Statements Variables & Operators Branching Instructions
Phys4051: C Lecture 2 & 3 Functions (Review) Comment Statements Variables & Operators Branching Instructions Comment Statements! Method 1: /* */! Method 2: // /* Single Line */ //Single Line /* This comment
More informationTo Java SE 8, and Beyond (Plan B)
11-12-13 To Java SE 8, and Beyond (Plan B) Francisco Morero Peyrona EMEA Java Community Leader 8 9...2012 2020? Priorities for the Java Platforms Grow Developer Base Grow Adoption
More information6.s096. Introduction to C and C++
6.s096 Introduction to C and C++ 1 Why? 2 1 You seek performance 3 1 You seek performance zero-overhead principle 4 2 You seek to interface directly with hardware 5 3 That s kinda it 6 C a nice way to
More informationLecture 5: Java Fundamentals III
Lecture 5: Java Fundamentals III School of Science and Technology The University of New England Trimester 2 2015 Lecture 5: Java Fundamentals III - Operators Reading: Finish reading Chapter 2 of the 2nd
More informationAn Introduction to Assembly Programming with the ARM 32-bit Processor Family
An Introduction to Assembly Programming with the ARM 32-bit Processor Family G. Agosta Politecnico di Milano December 3, 2011 Contents 1 Introduction 1 1.1 Prerequisites............................. 2
More informationProject 2: Bejeweled
Project 2: Bejeweled Project Objective: Post: Tuesday March 26, 2013. Due: 11:59PM, Monday April 15, 2013 1. master the process of completing a programming project in UNIX. 2. get familiar with command
More informationCMSC 10600 Fundamentals of Computer Programming II (C++)
CMSC 10600 Fundamentals of Computer Programming II (C++) Department of Computer Science University of Chicago Winter 2011 Quarter Dates: January 3 through March 19, 2011 Lectures: TuTh 12:00-13:20 in Ryerson
More informationUsing EDA Databases: Milkyway & OpenAccess
Using EDA Databases: Milkyway & OpenAccess Enabling and Using Scripting Languages with Milkyway and OpenAccess Don Amundson Khosro Khakzadi 2006 LSI Logic Corporation 1 Outline History Choice Of Scripting
More informationEnhanced Project Management for Embedded C/C++ Programming using Software Components
Enhanced Project Management for Embedded C/C++ Programming using Software Components Evgueni Driouk Principal Software Engineer MCU Development Tools 1 Outline Introduction Challenges of embedded software
More informationJava Crash Course Part I
Java Crash Course Part I School of Business and Economics Institute of Information Systems HU-Berlin WS 2005 Sebastian Kolbe skolbe@wiwi.hu-berlin.de Overview (Short) introduction to the environment Linux
More informationIntroduction to Java Applications. 2005 Pearson Education, Inc. All rights reserved.
1 2 Introduction to Java Applications 2.2 First Program in Java: Printing a Line of Text 2 Application Executes when you use the java command to launch the Java Virtual Machine (JVM) Sample program Displays
More informationParallelization: Binary Tree Traversal
By Aaron Weeden and Patrick Royal Shodor Education Foundation, Inc. August 2012 Introduction: According to Moore s law, the number of transistors on a computer chip doubles roughly every two years. First
More informationLecture 1 Introduction to Android
These slides are by Dr. Jaerock Kwon at. The original URL is http://kettering.jrkwon.com/sites/default/files/2011-2/ce-491/lecture/alecture-01.pdf so please use that instead of pointing to this local copy
More informationLexical Analysis and Scanning. Honors Compilers Feb 5 th 2001 Robert Dewar
Lexical Analysis and Scanning Honors Compilers Feb 5 th 2001 Robert Dewar The Input Read string input Might be sequence of characters (Unix) Might be sequence of lines (VMS) Character set ASCII ISO Latin-1
More informationFundamentals of Java Programming
Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors
More informationDebugging with TotalView
Tim Cramer 17.03.2015 IT Center der RWTH Aachen University Why to use a Debugger? If your program goes haywire, you may... ( wand (... buy a magic... read the source code again and again and...... enrich
More information1001ICT Introduction To Programming Lecture Notes
1001ICT Introduction To Programming Lecture Notes School of Information and Communication Technology Griffith University Semester 2, 2015 1 3 A First MaSH Program In this section we will describe a very
More informationCSCE 665: Lab Basics. Virtual Machine. Guofei Gu
CSCE 665: Lab Basics Guofei Gu Virtual Machine Virtual Machine: a so?ware implementacon of a programmable machine(client), where the so?ware implementacon is constrained within another computer(host) at
More informationProgramming Languages CIS 443
Course Objectives Programming Languages CIS 443 0.1 Lexical analysis Syntax Semantics Functional programming Variable lifetime and scoping Parameter passing Object-oriented programming Continuations Exception
More informationC Compiler Targeting the Java Virtual Machine
C Compiler Targeting the Java Virtual Machine Jack Pien Senior Honors Thesis (Advisor: Javed A. Aslam) Dartmouth College Computer Science Technical Report PCS-TR98-334 May 30, 1998 Abstract One of the
More informationCS 103 Lab Linux and Virtual Machines
1 Introduction In this lab you will login to your Linux VM and write your first C/C++ program, compile it, and then execute it. 2 What you will learn In this lab you will learn the basic commands and navigation
More informationScoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6)
Semantic Analysis Scoping (Readings 7.1,7.4,7.6) Static Dynamic Parameter passing methods (7.5) Building symbol tables (7.6) How to use them to find multiply-declared and undeclared variables Type checking
More informationWIND RIVER DIAB COMPILER
AN INTEL COMPANY WIND RIVER DIAB COMPILER Boost application performance, reduce memory footprint, and produce high-quality, standards-compliant object code for embedded systems with Wind River Diab Compiler.
More informationChapter 1. Dr. Chris Irwin Davis Email: cid021000@utdallas.edu Phone: (972) 883-3574 Office: ECSS 4.705. CS-4337 Organization of Programming Languages
Chapter 1 CS-4337 Organization of Programming Languages Dr. Chris Irwin Davis Email: cid021000@utdallas.edu Phone: (972) 883-3574 Office: ECSS 4.705 Chapter 1 Topics Reasons for Studying Concepts of Programming
More informationChannel Access Client Programming. Andrew Johnson Computer Scientist, AES-SSG
Channel Access Client Programming Andrew Johnson Computer Scientist, AES-SSG Channel Access The main programming interface for writing Channel Access clients is the library that comes with EPICS base Written
More information64-Bit NASM Notes. Invoking 64-Bit NASM
64-Bit NASM Notes The transition from 32- to 64-bit architectures is no joke, as anyone who has wrestled with 32/64 bit incompatibilities will attest We note here some key differences between 32- and 64-bit
More informationTopics. Parts of a Java Program. Topics (2) CS 146. Introduction To Computers And Java Chapter Objectives To understand:
Introduction to Programming and Algorithms Module 2 CS 146 Sam Houston State University Dr. Tim McGuire Introduction To Computers And Java Chapter Objectives To understand: the meaning and placement of
More informationC Interview Questions
http://techpreparation.com C Interview Questions And Answers 2008 V i s i t T e c h P r e p a r a t i o n. c o m f o r m o r e i n t e r v i e w q u e s t i o n s a n d a n s w e r s C Interview Questions
More informationFirst Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science
First Java Programs V. Paúl Pauca Department of Computer Science Wake Forest University CSC 111D Fall, 2015 Hello World revisited / 8/23/15 The f i r s t o b l i g a t o r y Java program @author Paul Pauca
More informationNumerical Algorithms Group
Title: Summary: Calling C Library Routines from Java Using the Java Native Interface This paper presents a technique for calling C library routines directly from Java, saving you the trouble of rewriting
More informationJ a v a Quiz (Unit 3, Test 0 Practice)
Computer Science S-111a: Intensive Introduction to Computer Science Using Java Handout #11 Your Name Teaching Fellow J a v a Quiz (Unit 3, Test 0 Practice) Multiple-choice questions are worth 2 points
More informationLanguage Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages
ICOM 4036 Programming Languages Preliminaries Dr. Amirhossein Chinaei Dept. of Electrical & Computer Engineering UPRM Spring 2010 Language Evaluation Criteria Readability: the ease with which programs
More informationChapter 5 Names, Bindings, Type Checking, and Scopes
Chapter 5 Names, Bindings, Type Checking, and Scopes Chapter 5 Topics Introduction Names Variables The Concept of Binding Type Checking Strong Typing Scope Scope and Lifetime Referencing Environments Named
More informationThe C Programming Language
Chapter 1 The C Programming Language In this chapter we will learn how to write simple computer programs using the C programming language; perform basic mathematical calculations; manage data stored in
More informationHow Compilers Work. by Walter Bright. Digital Mars
How Compilers Work by Walter Bright Digital Mars Compilers I've Built D programming language C++ C Javascript Java A.B.E.L Compiler Compilers Regex Lex Yacc Spirit Do only the easiest part Not very customizable
More informationNext, the driver runs the C compiler (cc1), which translates main.i into an ASCII assembly language file main.s.
Chapter 7 Linking Linking is the process of collecting and combining various pieces of code and data into a single file that can be loaded (copied) into memory and executed. Linking can be performed at
More informationELEC3730 Embedded Systems Lecture 1: Introduction and C Essentials
ELEC3730 Embedded Systems Lecture 1: Introduction and C Essentials Overview of Embedded Systems Essentials of C programming - Lecture 1 1 Embedded System Definition and Examples Embedded System Definition:
More informationMoving from CS 61A Scheme to CS 61B Java
Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you
More informationSystem Calls and Standard I/O
System Calls and Standard I/O Professor Jennifer Rexford http://www.cs.princeton.edu/~jrex 1 Goals of Today s Class System calls o How a user process contacts the Operating System o For advanced services
More informationProgramming with the Dev C++ IDE
Programming with the Dev C++ IDE 1 Introduction to the IDE Dev-C++ is a full-featured Integrated Development Environment (IDE) for the C/C++ programming language. As similar IDEs, it offers to the programmer
More informationIntroduction to Scientific Computing Part II: C and C++ C. David Sherrill School of Chemistry and Biochemistry Georgia Institute of Technology
Introduction to Scientific Computing Part II: C and C++ C. David Sherrill School of Chemistry and Biochemistry Georgia Institute of Technology The C Programming Language: Low-level operators Created by
More informationPrograming the Microprocessor in C Microprocessor System Design and Interfacing ECE 362
PURDUE UNIVERSITY Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362 Course Staff 1/31/2012 1 Introduction This tutorial is made to help the student use C language
More informationSemantic Analysis: Types and Type Checking
Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors
More informationTo connect to the cluster, simply use a SSH or SFTP client to connect to:
RIT Computer Engineering Cluster The RIT Computer Engineering cluster contains 12 computers for parallel programming using MPI. One computer, cluster-head.ce.rit.edu, serves as the master controller or
More informationcsce4313 Programming Languages Scanner (pass/fail)
csce4313 Programming Languages Scanner (pass/fail) John C. Lusth Revision Date: January 18, 2005 This is your first pass/fail assignment. You may develop your code using any procedural language, but you
More informationHPC Wales Skills Academy Course Catalogue 2015
HPC Wales Skills Academy Course Catalogue 2015 Overview The HPC Wales Skills Academy provides a variety of courses and workshops aimed at building skills in High Performance Computing (HPC). Our courses
More informationCrash Course in Java
Crash Course in Java Based on notes from D. Hollinger Based in part on notes from J.J. Johns also: Java in a Nutshell Java Network Programming and Distributed Computing Netprog 2002 Java Intro 1 What is
More informationStorage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas
CS 110B - Rule Storage Classes Page 18-1 Attributes are distinctive features of a variable. Data type, int or double for example, is an attribute. Storage class is another attribute. There are four storage
More information