资源描述:
《creating java to native code interfaces with janet extensionnew》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、CreatingJavatoNativeCodeInterfaceswithJanetExtension1;213MarianBubak,DawidKurzyniec,andPiotrLuszczek1InstituteofComputerScience,AGH,al.Mickiewicza30,30-059Krakow,Poland2AcademicComputerCentre{CYFRONET,Nawojki11,30-950Krakow,Poland3Dept.ofComputerScie
2、nce,UniversityofTennessee,Knoxville,TN37996-1301,USAe-mail:bubak@uci.agh.edu.pl,dawidk@icsr.agh.edu.pl,luszczek@cs.utk.eduphone:(+4812)6173964,fax:(+4812)6338054AbstractAsJavaisbeingconsideredanappropriateenvironmentforhighper-formancecomputing,theinte
3、restarisesincombiningitwithexistingcodewritteninotherlanguages.PortableJavatonativecodeinterfacesmaybedevelopedusingtheJavaNativeInterface(JNI).However,asalow-levelAPIitisratherinconvenienttobeuseddirectlythusthehigherleveltoolsandtechniquesaredesired.
4、WepresentJanet{thehighlyexpressiveJavalanguageextensionenablingconvenientcreationofpowerfulandecientJavatonativecodeinterfaces.1IntroductionFromthesmallprogramminglanguagedesignedforembeddedconsumer-electronicapplications,infewyearsJava[1]becamepowerf
5、ulgeneral-purposetechnologyusedallovertheworldtosolveproblemsofanykindacrossdierenthardwareplatforms.Recently,thereisagrowinginterestinapplicationoftheJavalanguageinthehighperformancecomputing(seee.g.,[2,3,4,5].)Thereasonisthatthelanguageisportable(su
6、itableforheterogenousenvironments),simple(easytolearn),safe(facilitatesdebugging),secure(enablessecuredistributedcomput-ing),modern(isobjectoriented,employsautomaticmemorymanagementandusesexceptionstohandleerroneoussituations).AstheperformanceofJavaVir
7、tualMachines(VM)continuouslyincreases[3,4]themainissuebecomesthelackofscienticlibrariesdesignedforuseinJava[6].Atthesametime,thereisagooddealofpreciselytunedandthoroughlytestedscienticlibrarieswritteninC,Fortranandotherlanguages.Themostappropriateway
8、tomakethemavailableinJavaistoprovidepertinentinterfacesforthemviatheJavaNativeInterface(JNI)API[7,8].Unfortunately,asalowlevelinterfaceJNIisratherinconvenienttobeuseddirectly.Severaltoolswhichautomateinterfacecreationprocesshavebeendeve