Skip to content

Instantly share code, notes, and snippets.

@jcaesar
Created June 2, 2012 19:41
Show Gist options
  • Save jcaesar/2859719 to your computer and use it in GitHub Desktop.
Save jcaesar/2859719 to your computer and use it in GitHub Desktop.
diff --git a/example/redblack.c b/example/redblack.c
index f9b247d..de77667 100644
--- a/example/redblack.c
+++ b/example/redblack.c
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
+#include <valgrind/mctracer.h>
+
#define SIZE 1024
int main()
@@ -10,6 +12,7 @@ int main()
double sum = 0.0;
m = (double*) malloc(sizeof(double)*SIZE*SIZE);
+ SSIM_TRACE_MATRIX(m, SIZE, SIZE, sizeof(double), "redblack");
// init points
for(i=0; i<SIZE; i++)
@@ -43,6 +46,8 @@ int main()
m[ i*SIZE + j+1] )/4.0;
}
+ SSIM_DELETE_MATRIX(m);
+
// print checksum
for(i=0; i<SIZE; i++)
for(j=0; j<SIZE; j++)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment