Yale CPSC 424 - Titanium and Java Parallelism (5 pages)

Previewing pages 1, 2 of 5 page document View the full content.
View Full Document

Titanium and Java Parallelism



Previewing pages 1, 2 of actual document.

View the full content.
View Full Document
View Full Document

Titanium and Java Parallelism

92 views

Lecture Notes


Pages:
5
School:
Yale University
Course:
Cpsc 424 - Parallel Programming Techniques

Unformatted text preview:

Titanium Take the best features of threads and MPI just like Split C Titanium and Java Parallelism Based on Java a cleaner C Language is extensible through classes Arvind Krishnamurthy Fall 2004 global address space like threads ease programming SPMD parallelism like MPI for performance local global distinction i e layout matters for performance classes memory management domain specific language extensions support for grid based computations including adaptive mesh refinement AMR Optimizing compiler compiled down to C communication and memory optimizations cache and other uniprocessor optimizations Java A Cleaner C Java is an object oriented language implementations will store these on the program stack access is fast Objects user defined and from the standard library Safe Primitive scalar types boolean double int etc Syntax similar to C classes no standalone functions with methods inheritance between classes multiple interface inheritance only class Hello public static void main String argv System out println Hello world Java Objects passed by pointer value object sharing into functions has level of indirection pointer to implicit simple model but inefficient for small objects Strongly typed checked at compile time no unsafe casts Automatic memory management Titanium is almost strict superset 2 6 r 7 1 3 true Java Object Example class Complex private double real private double imag public Complex double r double i real r imag i public Complex add Complex c return new Complex c real real c imag imag public double getReal return real public double getImag return imag Complex c new Complex 7 1 4 3 c c add c class VisComplex extends Complex i 4 3 Immutable Classes in Titanium For small objects would sometimes prefer to avoid level of indirection pass by value copying of entire object especially when objects are immutable fields are unchangeable extends the idea of primitive values 1 4 2 etc to userdefined values Titanium introduces immutable classes all fields are



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Titanium and Java Parallelism and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Titanium and Java Parallelism and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?