Skip to content

Instantly share code, notes, and snippets.

@shintakezou
Created March 30, 2012 21:27
Show Gist options
  • Save shintakezou/2255266 to your computer and use it in GitHub Desktop.
Save shintakezou/2255266 to your computer and use it in GitHub Desktop.
old foo example
int foo()
{
matrix a = NULL, b = NULL, c = NULL;
matrix_ctx ctx = NULL;
matrix_start(ctx);
a = matrix_new(ctx, 1000, 1000);
b = matrix_new(ctx, 1000, 1000);
c = matrix_assign(ctx, c, a);
c = matrix_mult(ctx, c, matrix_unit(ctx, 2));
c = matrix_sum(ctx, c, b);
matrix_end(ctx);
return some_value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment