Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Properly mutate kernel for scalar operation
  • Loading branch information
Diablo-D3 committed Jan 20, 2012
1 parent 45a4c7f commit 2384dab
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/main/java/com/diablominer/DiabloMiner/DiabloMiner.java
Expand Up @@ -474,16 +474,26 @@ protected PasswordAuthentication getPasswordAuthentication() {
}
}

if(vectors[0] > 1)
replace = replace.replaceAll("zz", String.valueOf(vectors[0]));
else
replace = replace.replaceAll("zz", "");

if(sourceLine.contains("any") && vectors[0] == 1)
replace = replace.replace("any(", "").replace("))", ")");

if(!array) {
replace = replace.replaceAll("zz", String.valueOf(vectors[0]))
.replaceAll("z Z([A-Z])\\[[0-9]\\]", "z Z$10; z Z$11; z Z$12; z Z$13")
replace = replace.replaceAll("z Z([A-Z])\\[[0-9]\\]", "z Z$10; z Z$11; z Z$12; z Z$13")
.replaceAll("Z([A-Z])\\[([0-9])\\]", "Z$1$2");
}

source += replace.replaceAll("Z", UPPER[y]).replaceAll("z", LOWER[y]) + "\n";
}
} else if(sourceLine.contains("__global")) {
source += sourceLine.replaceAll("uint", "uint" + vectors[0]);
if(vectors[0] > 1)
source += sourceLine.replaceAll("uint", "uint" + vectors[0]);
else
source += sourceLine;
} else {
source += sourceLine + "\n";
}
Expand Down

0 comments on commit 2384dab

Please sign in to comment.