Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
merge latest lieonn, revert move cmd.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsofcotton authored Sep 29, 2024
1 parent dc1f666 commit d70197f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Searching the Internet more...
python3 test.py ./gokibin (tilecat|tilecatb|tilecatr|tilecatbr) <tile count> < cat.txt
python3 test.py ./gokibin match input0.png input1.png <vboxdst> <vboxsrc> <number_of_submatches> <number_of_emphasis>
python3 test.py ./gokibin i2i <param> img0.png ...
python3 test.py ./gokibin move <param>
python3 test.py ./gokibin move

# Another downloads
* https://konbu.azurewebsites.net/ (Sample Site)
Expand Down
8 changes: 4 additions & 4 deletions lieonn.hh
Original file line number Diff line number Diff line change
Expand Up @@ -3287,6 +3287,7 @@ template <typename T> inline T P012L<T>::next(const SimpleVector<T>& d) {
if(! cat[i].first.size()) continue;
if(! (cat[i].first.size() <= cat[i].first[0].size() + 1)) cerr << "!" << flush;
SimpleVector<T> avg(cat[i].first[0].size() + 1);
avg.O();
for(int j = 0; j < cat[i].first.size(); j ++)
avg += makeProgramInvariant<T>(cat[i].first[j]).first;
work[work.size() - 1] = T(int(0));
Expand Down Expand Up @@ -4395,17 +4396,16 @@ template <typename T, int nprogress = 100> static inline SimpleVector<T> predv1(
p.entity.emplace_back(predv0<T, nprogress>(in.subVector(i, in.size() - unit + 1).entity, to_string(i) + string(" / ") + to_string(unit), step));
SimpleVector<T> res(in[0].size());
res.O();
SimpleMatrix<T> ip((p.size() - 1) / step, res.size());
SimpleMatrix<T> ip(p.size() - step, res.size());
#if defined(_OPENMP)
#pragma omp parallel
#pragma for schedule(static, 1)
#endif
for(int i = 0; i < ip.rows(); i ++) {
for(int j = 0; j < ip.cols(); j ++)
ip(i, j) = (p[(i - ip.rows()) * step + step - 1 + p.size() - 1][j] *
ip(i, j) = (p[i - ip.rows() + p.size() - step][j] *
T(int(2)) - T(int(1)) ) *
(in[(i - ip.rows()) * step + in.size() + step - 1][j] *
T(int(2)) - T(int(1)) );
(in[i - ip.rows() + in.size()][j] * T(int(2)) - T(int(1)) );
}
// N.B. we need gamma complement after this.
// dftcache need to be single thread on first call.
Expand Down
8 changes: 6 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@
elif(argv[2] == "move"):
curdir = os.path.basename(os.getcwd())
subprocess.call(["mv", "predg.ppm", curdir + ".ppm"])
for t in range(0, int(argv[3])):
subprocess.call(["mv", "predg-" + str(t) + ".ppm", curdir + "-" + str(t) + ".ppm"])
s = 0
while(True):
b = subprocess.call(["mv", "predg-" + str(s) + ".ppm", curdir + "-" + str(s) + ".ppm"])
s += 1
if(f != 0):
break
elif(argv[2] == "mprep"):
for line in argv[4:]:
subprocess.call(["sh", "-c", argv[1] + " - " + line + " < " + argv[3]])
Expand Down

0 comments on commit d70197f

Please sign in to comment.