Created
May 20, 2017 07:28
-
-
Save 9il/6abea2f62adec4ff6e1b5128a8f5af75 to your computer and use it in GitHub Desktop.
This file contains 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
import mir.ndslice.slice; | |
auto copySlow(CanonicalMatrix!ubyte f, CanonicalMatrix!ubyte t) | |
{ | |
assert(f.shape == t.shape); | |
foreach(i; 0..f.length!0) | |
foreach(j; 0..f.length!1) | |
t[i, j] = f[i, j]; | |
} | |
auto copyFast(CanonicalMatrix!ubyte f, CanonicalMatrix!ubyte t) | |
{ | |
assert(f.shape == t.shape); | |
foreach(i; 0..f.length!0) | |
foreach(j; 0..f.length!1) | |
t[i][j] = f[i][j]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment