Created
July 19, 2019 21:51
-
-
Save keveman/94da194efb62e346cb973ab85d2a4ce6 to your computer and use it in GitHub Desktop.
outer product
This file contains hidden or 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
#include <iostream> | |
#include "peg.inl.h" | |
@macro void foo(const char* str) { | |
@meta auto x = parse(str); | |
@meta x.dump(std::cout); | |
} | |
float W[32][16], x[32], y[16]; | |
void outer_product() { | |
@macro foo(` | |
all(i, j) in (32, 16) | |
W[i][j] = x[i] * y[j] | |
`); | |
} | |
int main() { | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment