Created
May 21, 2023 01:18
-
-
Save vthacker/4c1b3e1cbd20d43856cffba894794192 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String args[]) { | |
Jep338FullMaskVectorOperations test = new Jep338FullMaskVectorOperations(); | |
float[] a = new float[]{1.0f, 2.0f, 2.0f, 1.0f, 1.0f, 1.0f, 1.0f}; | |
float[] b = new float[]{3.0f, 4.0f, 8.0f, 9.9f, 1.0f, 1.0f, 1.0f}; | |
// this returns NaN | |
// That's because "int bound = species.loopBound(v1.length);" returns 0 when length <=7 on my macbook pro | |
// which means the for loop is never executed. | |
// I think in this example we'd need to change the for loop to be v1.length? | |
System.out.println(test.cosineSimilarity(a,b)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment