diff --git a/README b/README
index 895dcd255..3f0e69a8e 100644
--- a/README
+++ b/README
@@ -53,7 +53,7 @@ Stable version is published on Maven:
com.github.vsonnier
hppcrt
- 0.6.7
+ 0.6.8
````
diff --git a/hppcrt-benchmarks/pom.xml b/hppcrt-benchmarks/pom.xml
index 330a94b03..6d9421d63 100644
--- a/hppcrt-benchmarks/pom.xml
+++ b/hppcrt-benchmarks/pom.xml
@@ -5,14 +5,14 @@
com.github.vsonnier
hppcrt-parent
- 0.6.8-SNAPSHOT
+ 0.6.8
../pom.xml
com.github.vsonnier
hppcrt-benchmarks
- 0.6.8-SNAPSHOT
+ 0.6.8
jar
HPPC-RT Benchmarks
diff --git a/hppcrt-core/pom.xml b/hppcrt-core/pom.xml
index 0a16b9b0d..f58c6c691 100644
--- a/hppcrt-core/pom.xml
+++ b/hppcrt-core/pom.xml
@@ -6,14 +6,14 @@
com.github.vsonnier
hppcrt-parent
- 0.6.8-SNAPSHOT
+ 0.6.8
../pom.xml
com.github.vsonnier
hppcrt
- 0.6.8-SNAPSHOT
+ 0.6.8
jar
HPPC-RT Collections
diff --git a/hppcrt-core/src/main/templates/com/carrotsearch/hppcrt/VTypeArrays.java b/hppcrt-core/src/main/templates/com/carrotsearch/hppcrt/VTypeArrays.java
index 15f94944c..9c44c6a4b 100644
--- a/hppcrt-core/src/main/templates/com/carrotsearch/hppcrt/VTypeArrays.java
+++ b/hppcrt-core/src/main/templates/com/carrotsearch/hppcrt/VTypeArrays.java
@@ -11,8 +11,7 @@
* and will indeed be replaced by a (VType) instantiation
* of KTypeArrays.
*/
-/*! ${TemplateOptions.doNotGenerateKType("all")} !*/
-/*! ${TemplateOptions.doNotGenerateVType("all")} !*/
+/*! ${TemplateOptions.doNotGenerate()} !*/
/*! ${TemplateOptions.generatedAnnotation} !*/
public final class VTypeArrays
{
diff --git a/hppcrt-examples/pom.xml b/hppcrt-examples/pom.xml
index 5b1f3866b..7fd274c62 100644
--- a/hppcrt-examples/pom.xml
+++ b/hppcrt-examples/pom.xml
@@ -5,14 +5,14 @@
com.github.vsonnier
hppcrt-parent
- 0.6.8-SNAPSHOT
+ 0.6.8
../pom.xml
com.github.vsonnier
hppcrt-examples
- 0.6.8-SNAPSHOT
+ 0.6.8
jar
HPPC-RT Examples
diff --git a/hppcrt-templateprocessor/pom.xml b/hppcrt-templateprocessor/pom.xml
index 9b68b2d9e..b35c69bf6 100644
--- a/hppcrt-templateprocessor/pom.xml
+++ b/hppcrt-templateprocessor/pom.xml
@@ -5,14 +5,14 @@
com.github.vsonnier
hppcrt-parent
- 0.6.8-SNAPSHOT
+ 0.6.8
../pom.xml
com.github.vsonnier
hppcrt-templateprocessor
- 0.6.8-SNAPSHOT
+ 0.6.8
jar
HPPC-RT Template Processor
diff --git a/hppcrt-templateprocessor/src/main/java/com/carrotsearch/hppcrt/generator/TemplateOptions.java b/hppcrt-templateprocessor/src/main/java/com/carrotsearch/hppcrt/generator/TemplateOptions.java
index fec09820b..f97212bfd 100644
--- a/hppcrt-templateprocessor/src/main/java/com/carrotsearch/hppcrt/generator/TemplateOptions.java
+++ b/hppcrt-templateprocessor/src/main/java/com/carrotsearch/hppcrt/generator/TemplateOptions.java
@@ -253,7 +253,8 @@ public boolean inlineVTypeGenericAndPrimitive(final String callName, final Strin
}
public boolean inlineKTypeWithFullSpecialization(
- final String callName, String args,
+
+ final String callName, final String args,
final String genericCallBody,
final String integerCallBody,
final String longCallBody,
@@ -261,84 +262,37 @@ public boolean inlineKTypeWithFullSpecialization(
final String doubleCallBody,
final String booleanCallBody) {
- //Rebuild the arguments with a pattern understandable by the matcher
- args = args.replace("(", "").trim();
- args = args.replace(")", "").trim();
-
- //Pick the ones matching TemplateOptions current Type(s) :
- String body = "";
-
- if (this.ktype == Type.GENERIC) {
- body = genericCallBody;
-
- }
- else if (this.ktype == Type.BYTE) {
- body = integerCallBody;
-
- }
- else if (this.ktype == Type.CHAR) {
- body = integerCallBody;
-
- }
- else if (this.ktype == Type.SHORT) {
- body = integerCallBody;
-
- }
- else if (this.ktype == Type.INT) {
- body = integerCallBody;
-
- }
- else if (this.ktype == Type.LONG) {
- body = longCallBody;
-
- }
- else if (this.ktype == Type.FLOAT) {
- body = floatCallBody;
-
- }
- else if (this.ktype == Type.DOUBLE) {
- body = doubleCallBody;
-
- }
- else if (this.ktype == Type.BOOLEAN) {
- body = booleanCallBody;
- }
-
- //Update Pattern cache
- if (!this.inlineKTypeDefinitions.containsKey(callName)) {
- this.inlineKTypeDefinitions.put(callName, new InlinedMethodDef(callName));
- }
-
- //the method has no arguments
- if (args.isEmpty()) {
-
- this.inlineKTypeDefinitions.get(callName).setBody(body);
-
- if (this.verbose) {
-
- System.out.println("TemplateOptions : " + toString() + " captured the inlined KType function def '" +
- callName + "' with no argument : " +
- this.inlineKTypeDefinitions.get(callName));
- }
- }
- else {
-
- final String[] argsArray = args.split(",");
-
- this.inlineKTypeDefinitions.get(callName).setBody(TemplateOptions.reformatArguments(body, argsArray));
-
- if (this.verbose) {
+ return internalInlineWithFullSpecialization(this.ktype, this.inlineKTypeDefinitions,
+ callName, args,
+ genericCallBody,
+ integerCallBody,
+ longCallBody,
+ floatCallBody,
+ doubleCallBody,
+ booleanCallBody);
+ }
- System.out.println("TemplateOptions : " + toString() + " captured the inlined KType function def '" +
- callName + "' with multiple arguments : " +
- this.inlineKTypeDefinitions.get(callName));
- }
- }
+ public boolean inlineVTypeWithFullSpecialization(
+ final String callName, final String args,
+ final String genericCallBody,
+ final String integerCallBody,
+ final String longCallBody,
+ final String floatCallBody,
+ final String doubleCallBody,
+ final String booleanCallBody) {
- return false;
+ return internalInlineWithFullSpecialization(this.vtype, this.inlineVTypeDefinitions,
+ callName, args,
+ genericCallBody,
+ integerCallBody,
+ longCallBody,
+ floatCallBody,
+ doubleCallBody,
+ booleanCallBody);
}
- public boolean inlineVTypeWithFullSpecialization(
+ private boolean internalInlineWithFullSpecialization(final Type t,
+ final HashMap inlineDefs,
final String callName, String args,
final String genericCallBody,
final String integerCallBody,
@@ -354,71 +308,65 @@ public boolean inlineVTypeWithFullSpecialization(
//Pick the ones matching TemplateOptions current Type(s) :
String body = "";
- if (this.vtype == Type.GENERIC) {
+ if (t == Type.GENERIC) {
body = genericCallBody;
}
- else if (this.vtype == Type.BYTE) {
+ else if (t == Type.BYTE) {
body = integerCallBody;
}
- else if (this.vtype == Type.CHAR) {
+ else if (t == Type.CHAR) {
body = integerCallBody;
}
- else if (this.vtype == Type.SHORT) {
+ else if (t == Type.SHORT) {
body = integerCallBody;
}
- else if (this.vtype == Type.INT) {
+ else if (t == Type.INT) {
body = integerCallBody;
}
- else if (this.vtype == Type.LONG) {
+ else if (t == Type.LONG) {
body = longCallBody;
}
- else if (this.vtype == Type.FLOAT) {
+ else if (t == Type.FLOAT) {
body = floatCallBody;
}
- else if (this.vtype == Type.DOUBLE) {
+ else if (t == Type.DOUBLE) {
body = doubleCallBody;
}
- else if (this.vtype == Type.BOOLEAN) {
+ else if (t == Type.BOOLEAN) {
body = booleanCallBody;
}
//Update Pattern cache
- if (!this.inlineVTypeDefinitions.containsKey(callName)) {
- this.inlineVTypeDefinitions.put(callName, new InlinedMethodDef(callName));
+ if (!inlineDefs.containsKey(callName)) {
+ inlineDefs.put(callName, new InlinedMethodDef(callName));
}
//the method has no arguments
if (args.isEmpty()) {
- this.inlineVTypeDefinitions.get(callName).setBody(body);
+ inlineDefs.get(callName).setBody(body);
- if (this.verbose) {
-
- System.out.println("TemplateOptions : " + toString() + " captured the inlined VType function def '" +
- callName + "' with no argument : " +
- this.inlineVTypeDefinitions.get(callName));
- }
}
else {
final String[] argsArray = args.split(",");
- this.inlineVTypeDefinitions.get(callName).setBody(TemplateOptions.reformatArguments(body, argsArray));
+ inlineDefs.get(callName).setBody(TemplateOptions.reformatArguments(body, argsArray));
+ }
- if (this.verbose) {
+ if (this.verbose) {
- System.out.println("TemplateOptions : " + toString() + " captured the inlined VType function def '" +
- callName + "' with multiple arguments : " +
- this.inlineVTypeDefinitions.get(callName));
- }
+ System.out.println("TemplateOptions : " + toString() + " captured the inlined function name '" +
+ callName + "' of type '" + t + "' as '" +
+ inlineDefs.get(callName) + "'");
}
return false;
diff --git a/pom.xml b/pom.xml
index e55299a6c..8c1c4b7da 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
com.github.vsonnier
hppcrt-parent
- 0.6.8-SNAPSHOT
+ 0.6.8
pom
HPPC-RT (parent POM)