mirror of https://github.com/jlizier/jidt
Added separate ant tasks for GPU compilation, moved libraries to bin folder.
This commit is contained in:
parent
22bae87123
commit
004a7c7f17
34
build.xml
34
build.xml
|
|
@ -55,14 +55,16 @@
|
|||
</javac>
|
||||
|
||||
<!-- Compiling Cpp code -->
|
||||
<exec executable="make" dir="${src}/infodynamics/measures/continuous/kraskov/cuda/" if:set="enablegpu"/>
|
||||
<antcall target="gpu" if:set="enablegpu">
|
||||
<param name="DEBUG" value="0"/>
|
||||
</antcall>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- Jar the toolkit -->
|
||||
<target name="jar" depends="compile" description="Create the jar for distribution">
|
||||
<!-- Put everything in ${bin} into the infodynamics-${version}.jar file -->
|
||||
<jar jarfile="${jarplainname}" basedir="${bin}"/>
|
||||
<jar jarfile="${jarplainname}" basedir="${bin}" excludes="**/cuda/"/>
|
||||
</target>
|
||||
|
||||
<!-- Compile and run the JUnit tests -->
|
||||
|
|
@ -137,6 +139,7 @@
|
|||
<delete>
|
||||
<fileset dir="demos/java/infodynamics/demos/autoanalysis" includes="GeneratedCalculator.*"/>
|
||||
</delete>
|
||||
<antcall target="gpuclean"/>
|
||||
<!-- Don't delete the readme and version files - the user may not have the template to recreate them from -->
|
||||
</target>
|
||||
|
||||
|
|
@ -161,13 +164,34 @@
|
|||
</javac>
|
||||
|
||||
<!-- Compiling Cpp code -->
|
||||
<exec executable="make" dir="${src}/infodynamics/measures/continuous/kraskov/cuda/" if:set="enablegpu">
|
||||
<env key="DEBUG" value="1"/>
|
||||
</exec>
|
||||
<antcall target="gpu" if:set="enablegpu">
|
||||
<param name="DEBUG" value="1"/>
|
||||
</antcall>
|
||||
|
||||
<jar jarfile="${jarplainname}" basedir="${bin}"/>
|
||||
</target>
|
||||
|
||||
<!-- Compile GPU code -->
|
||||
<target name="gpu" depends="init" description="compile only C/C++ GPU code">
|
||||
<exec executable="make" dir="${src}/infodynamics/measures/continuous/kraskov/cuda/">
|
||||
<env key="DEBUG" value="${DEBUG}"/>
|
||||
</exec>
|
||||
<move todir="${bin}/infodynamics/measures/continuous/kraskov/cuda">
|
||||
<filelist dir="${src}/infodynamics/measures/continuous/kraskov/cuda">
|
||||
<file name="gpuKnnLibrary.o"/>
|
||||
<file name="libgpuKnnLibrary.a"/>
|
||||
<file name="libKraskov.so"/>
|
||||
</filelist>
|
||||
</move>
|
||||
</target>
|
||||
|
||||
<!-- Clean GPU code -->
|
||||
<target name="gpuclean" description="clean only C/C++ GPU code">
|
||||
<exec executable="make" dir="${src}/infodynamics/measures/continuous/kraskov/cuda/">
|
||||
<arg value="clean"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Developer build - creates readme and version files -->
|
||||
<target name="readmefiles" description="developer: create the readme and version files from templates">
|
||||
<tstamp>
|
||||
|
|
|
|||
|
|
@ -664,7 +664,7 @@ public abstract class MutualInfoCalculatorMultiVariateKraskov
|
|||
throw new Exception("Unable to load GPU library.");
|
||||
}
|
||||
String jarFolder = jarPath.toString().substring(0, jarPath.toString().lastIndexOf(fileSep));
|
||||
String relPath = fileSep + "java" + fileSep + "source" + fileSep +
|
||||
String relPath = fileSep + "bin" + fileSep +
|
||||
"infodynamics" + fileSep + "measures" + fileSep +
|
||||
"continuous" + fileSep + "kraskov" + fileSep + "cuda" +
|
||||
fileSep + "libKraskov.so";
|
||||
|
|
|
|||
Loading…
Reference in New Issue