Russel Winder <rus...@winder.org.uk> wrote on 04/18/2014 01:53:01 PM:
>
> I am trying to update a few of my (miniscule) X10 codes. I thought I
> would do a little "microbenchmarking" of the C++ and JVM backends. This
> of course entails "warming up" the JVM to get any kind of fair
> comparison. Is there a way for a code to know whether it is running on
> the C++ backend or a JVM?
>
> This is a RTFM type question I know, so a reference to the FM would be
> great!
>
Hi,
A typical idiom is to use @Native annotations. For example:
import x10.compiler.Native;
.....
@Native("java", "true")
@Native("c++", "false")
native def onJVM():Boolean;
We could (should?) provide something like this in a standard library
class like System or Runtime, but I don't believe we have done so.
--dave
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users