@Override public Object visitDotVectors(GAPPDotVectors gappDotVectors, Object arg) { curLine++; access(gappDotVectors.getDestination()); return null; }
@Override public Object visitDotVectors(GAPPDotVectors gappDotVectors, Object arg) { multivectors.add(gappDotVectors.getDestination().getName()); return null; }
@Override public Object visitDotVectors(GAPPDotVectors gappDotVectors, Object arg) { result.append("dotVectors "); printMultivector(gappDotVectors.getDestination()); result.append("["); printSelector(gappDotVectors.getDestSelector()); result.append("]"); result.append(" = "); printDotProduct(gappDotVectors.getParts()); result.append(";\n"); return null; }
@Override public Object visitDotVectors(GAPPDotVectors gappDotVectors, Object arg) { incrementSize(GAPPOpenCLCodeGenerator.getVarName(gappDotVectors.getDestination().getName()),1); return null; }
@Override public Object visitDotVectors(GAPPDotVectors gappDotVectors, Object arg) { final String destMv = GAPPOpenCLCodeGenerator.getVarName(gappDotVectors.getDestination().getName()); Integer thisMvSetCount = mvBladeMap.get(destMv).size();
@Override public Object visitDotVectors(GAPPDotVectors gappDotVectors, Object arg) { return new GAPPDotVectors( (GAPPMultivector) GAPPValueHolderCopier.copyValueHolder(gappDotVectors.getDestination()), copySelector(gappDotVectors.getDestSelector()), copyVectors(gappDotVectors.getParts())); }
@Override public Object visitDotVectors(GAPPDotVectors gappDotVectors, Object arg) { MultivectorWithValues destination = getMultivector(gappDotVectors.getDestination().getName()); // calculate the dot product double sum = 0; int size = getMultivector(gappDotVectors.getParts().getFirst().getName()).getEntries().length; for (int slot = 0; slot < size; slot++) { double prod = 1; for (GAPPVector part : gappDotVectors.getParts()) { prod *= getMultivector(part.getName()).getEntry(slot); } sum += prod; } Selector sDest = gappDotVectors.getDestSelector(); destination.setEntry(sDest.getIndex(), sDest.getSign() * sum); return null; }