Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl
In directory usw-pr-cvs1:/tmp/cvs-serv11804/src/java/org/lwjgl
Modified Files:
Math.java
Log Message:
This n that
Index: Math.java
CVS Browser:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Math.java
===================================================================
RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Math.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- Math.java 23 Aug 2002 16:14:21 -0000 1.6
+++ Math.java 26 Aug 2002 20:39:28 -0000 1.7
@@ -405,6 +405,8 @@
boolean transposeRightSource,
boolean transposeDest);
+
+
abstract MatrixOpClassification classify();
}
@@ -822,6 +824,21 @@
boolean transposeDest) {
}
+ /**
+ * Check a binary operation to make sure that when dealing with n x n
+ * result sets that when both n's are greater than 1 the operation must
+ * be safe; otherwise if is direct, then the side where n > 1 must be
+ * the destination.
+ */
+ abstract MatrixOpClassification checkBinaryOp(
+ int leftSourceElements,
+ int rightSourceElements,
+ int leftSourceAddress,
+ int rightSourceAddress,
+ int destinationAddress
+ );
+
+
public final MatrixOpClassification check(
int sourceAddress,
int sourceStride,
@@ -1014,6 +1031,7 @@
// Check unary matrix operation type
MatrixOpClassification op = operation.classify().check(leftSourceAddress, leftSourceStride, leftElements, destAddress, destStride);
op = op.check(rightSourceAddress, rightSourceStride, rightElements, destAddress, destStride);
+ op = op.checkBinaryOp(leftElements, rightElements, leftSourceAddress, rightSourceAddress, destAddress);
op.execute(
leftSourceAddress,
leftSourceStride,
|