Skip to content

Instantly share code, notes, and snippets.

@ryanfb
Created August 1, 2016 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanfb/73000ae2b3e59a70747d6088690599ad to your computer and use it in GitHub Desktop.
Save ryanfb/73000ae2b3e59a70747d6088690599ad to your computer and use it in GitHub Desktop.
diff -ur linux/DeepFlow_release2.0/Makefile osx/DeepFlow_release2.0/Makefile
--- linux/DeepFlow_release2.0/Makefile 2015-09-17 11:32:47.000000000 -0400
+++ osx/DeepFlow_release2.0/Makefile 2016-07-27 14:46:58.000000000 -0400
@@ -1,4 +1,4 @@
-CC=gcc
+CC=/usr/local/bin/gcc-6
CFLAGS=-Wall -g -O3 -msse4 -fPIC
LDFLAGS=-g -Wall -O3 -msse4 -fPIC
Only in osx/DeepFlow_release2.0: deepflow2.dSYM
diff -ur linux/DeepFlow_release2.0/image.c osx/DeepFlow_release2.0/image.c
--- linux/DeepFlow_release2.0/image.c 2015-08-06 06:22:20.000000000 -0400
+++ osx/DeepFlow_release2.0/image.c 2016-07-27 14:45:43.000000000 -0400
@@ -17,7 +17,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <malloc.h>
#include <math.h>
#include "image.h"
@@ -37,7 +36,7 @@
image->width = width;
image->height = height;
image->stride = ( (width+3) / 4 ) * 4;
- image->data = (float*) memalign(16, image->stride*height*sizeof(float));
+ image->data = (float*) (image->stride*height*sizeof(float));
if(image->data == NULL){
fprintf(stderr, "Error: image_new() - not enough memory !\n");
exit(1);
@@ -90,7 +89,7 @@
image->width = width;
image->height = height;
image->stride = ( (width+3) / 4 ) * 4;
- image->c1 = (float*) memalign(16, 3*image->stride*height*sizeof(float));
+ image->c1 = (float*) (3*image->stride*height*sizeof(float));
if(image->c1 == NULL){
fprintf(stderr, "Error: color_image_new() - not enough memory !\n");
exit(1);
@@ -126,7 +125,7 @@
im->width = w;
im->height = h;
im->stride = ((w+3)/4)*4;
- float *data = (float *) memalign(16, im->stride*h*sizeof(float));
+ float *data = (float *) (im->stride*h*sizeof(float));
if(data == NULL){
fprintf(stderr, "Error: resize_if_needed_newsize() - not enough memory !\n");
exit(1);
diff -ur linux/DeepFlow_release2.0/opticalflow.c osx/DeepFlow_release2.0/opticalflow.c
--- linux/DeepFlow_release2.0/opticalflow.c 2015-08-06 06:23:12.000000000 -0400
+++ osx/DeepFlow_release2.0/opticalflow.c 2016-07-27 14:44:29.000000000 -0400
@@ -17,7 +17,6 @@
#include <stdlib.h>
#include <math.h>
#include <string.h>
-#include <malloc.h>
#include "opticalflow.h"
#include "opticalflow_aux.h"
diff -ur linux/DeepFlow_release2.0/opticalflow_aux.c osx/DeepFlow_release2.0/opticalflow_aux.c
--- linux/DeepFlow_release2.0/opticalflow_aux.c 2015-08-06 06:23:26.000000000 -0400
+++ osx/DeepFlow_release2.0/opticalflow_aux.c 2016-07-27 14:44:39.000000000 -0400
@@ -16,7 +16,6 @@
*/
#include <stdlib.h>
#include <math.h>
-#include <malloc.h>
#include <string.h>
#include "opticalflow_aux.h"
diff -ur linux/DeepFlow_release2.0/solver.c osx/DeepFlow_release2.0/solver.c
--- linux/DeepFlow_release2.0/solver.c 2015-08-06 06:23:41.000000000 -0400
+++ osx/DeepFlow_release2.0/solver.c 2016-07-27 14:47:22.000000000 -0400
@@ -18,7 +18,6 @@
#include <stdlib.h>
#include <math.h>
#include <string.h>
-#include <malloc.h>
#include "image.h"
#include "solver.h"
@@ -86,7 +85,7 @@
const int stride = du->stride, width = du->width;
const int iterheight = du->height-1, iterline = (stride)/4, width_minus_1_sizeoffloat = sizeof(float)*(width-1);
int j,iter,i,k;
- float *floatarray = (float*) memalign(16, stride*sizeof(float)*3);
+ float *floatarray = (float*) (stride*sizeof(float)*3);
if(floatarray==NULL){
fprintf(stderr, "error in sor_coupled(): not enough memory\n");
exit(1);
diff -ur linux/deepmatching_1.0.2_c++/Makefile osx/deepmatching_1.0.2_c++/Makefile
--- linux/deepmatching_1.0.2_c++/Makefile 2015-05-07 10:15:54.000000000 -0400
+++ osx/deepmatching_1.0.2_c++/Makefile 2016-07-28 12:00:20.000000000 -0400
@@ -1,4 +1,4 @@
-CC=g++
+CC=/usr/local/bin/g++-6
OS_NAME=$(shell uname -s)
ifeq ($(OS_NAME),Linux)
@@ -11,8 +11,8 @@
LAPACKCFLAGS=-Dinteger=int
STATICLAPACKLDFLAGS=-fPIC -Wall -g -fopenmp -static -static-libstdc++ /home/lear/douze/tmp/jpeg-6b/libjpeg.a /usr/lib64/libpng.a /usr/lib64/libz.a /usr/lib64/libblas.a /usr/lib/gcc/x86_64-redhat-linux/4.9.2/libgfortran.a /usr/lib/gcc/x86_64-redhat-linux/4.9.2/libquadmath.a # statically linked version
-CFLAGS= -fPIC -Wall -g -std=c++11 $(LAPACKCFLAGS) -fopenmp -DUSE_OPENMP -O3
-LDFLAGS=-fPIC -Wall -g -ljpeg -lpng -fopenmp
+CFLAGS= -fPIC -Wall -g -ggdb -std=c++11 $(LAPACKCFLAGS) -fopenmp -DUSE_OPENMP
+LDFLAGS=-fPIC -Wall -g -ggdb -ljpeg -lpng -fopenmp
SOURCES := $(shell find . -name '*.cpp')
OBJ := $(SOURCES:%.cpp=%.o)
Only in osx/deepmatching_1.0.2_c++: deepmatching.dSYM
diff -ur linux/deepmatching_1.0.2_c++/image.cpp osx/deepmatching_1.0.2_c++/image.cpp
--- linux/deepmatching_1.0.2_c++/image.cpp 2014-04-25 11:48:36.000000000 -0400
+++ osx/deepmatching_1.0.2_c++/image.cpp 2016-07-27 14:42:57.000000000 -0400
@@ -16,7 +16,7 @@
image->width = width;
image->height = height;
image->stride = ( (width+3) / 4 ) * 4;
- image->data = (float*) memalign(16, image->stride*height*sizeof(float));
+ image->data = (float*)(image->stride*height*sizeof(float));
if(image->data == NULL)
{
fprintf(stderr, "Error: image_new() - not enough memory !\n");
@@ -127,7 +127,7 @@
im->width = w;
im->height = h;
im->stride = ((w+3)/4)*4;
- float *data = (float *) memalign(16, im->stride*h*sizeof(float));
+ float *data = (float *)(im->stride*h*sizeof(float));
if(data == NULL)
{
fprintf(stderr, "Error: resize_if_needed_newsize() - not enough memory !\n");
diff -ur linux/deepmatching_1.0.2_c++/std.h osx/deepmatching_1.0.2_c++/std.h
--- linux/deepmatching_1.0.2_c++/std.h 2014-03-22 07:49:08.000000000 -0400
+++ osx/deepmatching_1.0.2_c++/std.h 2016-07-27 14:40:48.000000000 -0400
@@ -20,7 +20,6 @@
#include <math.h>
#include <string.h>
#include <stdio.h>
-#include <malloc.h>
#include <stdlib.h>
#include <assert.h>
//#include <time.h>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment