Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-embree3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-embree3
Commits
bc8fb9ff
Commit
bc8fb9ff
authored
Dec 3, 2011
by
Keir Mierle
Browse files
Options
Downloads
Patches
Plain Diff
Add a fix for compiling the brute force region tracker from libmv on Mac OS X.
parent
232248d2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
extern/libmv/libmv/tracking/brute_region_tracker.cc
+14
-2
14 additions, 2 deletions
extern/libmv/libmv/tracking/brute_region_tracker.cc
with
14 additions
and
2 deletions
extern/libmv/libmv/tracking/brute_region_tracker.cc
+
14
−
2
View file @
bc8fb9ff
...
@@ -24,7 +24,14 @@
...
@@ -24,7 +24,14 @@
#include
<emmintrin.h>
#include
<emmintrin.h>
#endif
#endif
#include
<malloc.h>
// For memalign.
#ifndef __APPLE__
// Needed for memalign on Linux and _aligned_alloc on Windows.
#include
<malloc.h>
#else
// Apple's malloc is 16-byte aligned, and does not have malloc.h, so include
// stdilb instead.
#include
<cstdlib>
#endif
#include
"libmv/image/image.h"
#include
"libmv/image/image.h"
#include
"libmv/image/convolve.h"
#include
"libmv/image/convolve.h"
...
@@ -38,7 +45,12 @@ namespace {
...
@@ -38,7 +45,12 @@ namespace {
void
*
aligned_malloc
(
int
size
,
int
alignment
)
{
void
*
aligned_malloc
(
int
size
,
int
alignment
)
{
#ifdef _WIN32
#ifdef _WIN32
return
_aligned_malloc
(
size
,
alignment
);
return
_aligned_malloc
(
size
,
alignment
);
#else // TODO(keir): Will this work on Mac OS X?
#elif __APPLE__
// On Mac OS X, both the heap and the stack are guaranteed 16-byte aligned so
// they work natively with SSE types with no further work.
CHECK_EQ
(
alignment
,
16
);
return
malloc
(
size
);
#else // This is for Linux.
return
memalign
(
alignment
,
size
);
return
memalign
(
alignment
,
size
);
#endif
#endif
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment