Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 726 Bytes

README.md

File metadata and controls

22 lines (18 loc) · 726 Bytes

Simple parallel API for Java

A shared memory parallel API for Java with a close syntax to OpenMP. Developed to make it easier for students who only know Java to understand parallel programming before they start with OpenMP.

Example

parallelApi.parallel( t -> {
    System.out.println("Thread ID: " + t);
	parallelApi.single(() -> System.out.println("First arriving thread will execute"));		
	parallelApi.master(t, () -> System.out.println("Master thread execute"));		
	
	parallelApi.ordered(t, () -> {
	    System.out.println("Executed as sequential code")
	    ...
	});	
	
	parallelApi.critical(t, () -> {
	    System.out.println("Only one thread at the same time")
	    ...
	});	
});