Browse Source

anttweakbar patch

Former-commit-id: e7c496c3de1925d4bf64c962d673670040210ebc
Alec Jacobson (jalec 12 years ago
parent
commit
1a95558933
4 changed files with 13 additions and 12 deletions
  1. 1 1
      Makefile
  2. 3 2
      Makefile.conf
  3. 1 1
      include/igl/faces_first.h
  4. 8 8
      include/igl/readOFF.cpp

+ 1 - 1
Makefile

@@ -13,7 +13,7 @@ $(info Hello, $(IGL_USERNAME)!)
 
 # optimized default settings
 all: LFLAGS +=
-OPTFLAGS+=-O3 -DNDEBUG $(OPENMP)
+OPTFLAGS+=-O3 -DNDEBUG $(OPENMP) $(SSE) 
 #debug: OPTFLAGS= -g -Wall -Werror
 debug: OPTFLAGS+= -g -Wall
 CFLAGS += $(OPTFLAGS)

+ 3 - 2
Makefile.conf

@@ -10,7 +10,7 @@ ifeq ($(UNAME), Linux)
 else
 	DEFAULT_PREFIX = /opt/local/
 	# I guess arch only works in Mac OSX
-	AFLAGS += -arch x86_64 -m64
+	AFLAGS += -arch x86_64 -m64 -march=corei7-avx
 endif
 
 
@@ -27,8 +27,9 @@ ifeq ($(IGL_USERNAME),ajx)
 	IGL_WITH_MOSEK=1
 	IGL_WITH_PNG=1
 	# I don't use llvm
-	AFLAGS=-m64
+	AFLAGS = -m64 -march="corei7-avx"
 	OPENMP=-fopenmp
+	SSE=-mavx
 endif
 
 ifeq ($(IGL_USERNAME),alecjaco) 

+ 1 - 1
include/igl/faces_first.h

@@ -21,7 +21,7 @@ namespace igl
   //  RV  # vertices by 3 vertex positions, order such that if the jth vertex is
   //    some face in F, and the kth vertex is not then j comes before k
   //  RF  # faces by 3 list of face indices, reindexed to use RV
-  //  IM  # faces by 1 list of indices such that: RF = IM(F) and RT = IM(T)
+  //  IM  #V by 1 list of indices such that: RF = IM(F) and RT = IM(T)
   //    and RV(IM,:) = V
   //
   //

+ 8 - 8
include/igl/readOFF.cpp

@@ -4,15 +4,15 @@
 
 template <typename Scalar, typename Index>
 IGL_INLINE bool igl::readOFF(
-                             const std::string off_file_name, 
-                             std::vector<std::vector<Scalar > > & V,
-                             std::vector<std::vector<Index > > & F,
-                             std::vector<std::vector<Scalar > > & N)
+  const std::string off_file_name, 
+  std::vector<std::vector<Scalar > > & V,
+  std::vector<std::vector<Index > > & F,
+  std::vector<std::vector<Scalar > > & N)
 {
   FILE * off_file = fopen(off_file_name.c_str(),"r");                                       
   if(NULL==off_file)
   {
-    printf("IOError: %s could not be opened...",off_file_name.c_str());
+    printf("IOError: %s could not be opened...\n",off_file_name.c_str());
     return false; 
   }
   V.clear();
@@ -126,9 +126,9 @@ IGL_INLINE bool igl::readOFF(
 #ifndef IGL_NO_EIGEN
 template <typename DerivedV, typename DerivedF>
 IGL_INLINE bool igl::readOFF(
-                             const std::string str,
-                             Eigen::PlainObjectBase<DerivedV>& V,
-                             Eigen::PlainObjectBase<DerivedF>& F)
+  const std::string str,
+  Eigen::PlainObjectBase<DerivedV>& V,
+  Eigen::PlainObjectBase<DerivedF>& F)
 {
   std::vector<std::vector<double> > vV;
   std::vector<std::vector<double> > vN;