Advanced Software Technologies for Post-Peta Scale Computing by Mitsuhisa Sato
Author:Mitsuhisa Sato
Language: eng
Format: epub
ISBN: 9789811319242
Publisher: Springer Singapore
Then line 5 and 6 in Listing 8.3 can be replaced with the following single call:
mapmap(f, pos1, pos2);
Defining a convenience method such as mapmap is not possible if map is a macro function.
8.3 Bytespresso
To show our idea of deep reification, we implemented a Java library that provides deep reification in Java [2]. Our Java library named Bytespresso extracts an AST by bytecode decompilation. It needs to launch the Java virtual machine with the option jdk.internal.lambda.dumpProxyClasses. This option generates the bytecode of a dynamically generated lambda expression. For deep reification, Bytespresso reads the bytecode of a given lambda expression and decompiles it to construct an AST. It does not need source code; it only needs Java bytecode.
To support the implementation of an embedded DSL by deep reification, Bytespresso also provides a translator from ASTs to C or CUDA code. The code generated by the translation is normally compiled by an external C (or CUDA) compiler and executed in a separate process from the Java virtual machine. The generated code and the host Java code communicate with each other through a socket for portability.
Delimiting AST acquisition by deep reification, Bytespresso provides the @Native annotation. When a method has this annotation, the AST of the method body is not extracted by deep reification. The ASTs for the methods invoked by that method are not extracted either. Although a @Native method is translated into a C function by Bytespresso, the body of that C function is the argument to @Native. The following method is an example of @Native method:
@Native( "struct timeval time; gettimeofday(&time, NULL); "
+ "return time.tv_sec * 1000000 + time.tv_usec;")
public static long time() {
return System.nanoTime() / 1000;
}
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12570)
Hello! Python by Anthony Briggs(9914)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9796)
The Mikado Method by Ola Ellnestam Daniel Brolund(9777)
Dependency Injection in .NET by Mark Seemann(9337)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8296)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7070)
Microservices with Go by Alexander Shuiskov(6830)
Practical Design Patterns for Java Developers by Miroslav Wengner(6749)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6693)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6413)
Angular Projects - Third Edition by Aristeidis Bampakos(6095)
The Art of Crafting User Stories by The Art of Crafting User Stories(5621)
NetSuite for Consultants - Second Edition by Peter Ries(5558)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5365)
Kotlin in Action by Dmitry Jemerov(5062)
