-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
ports/nlopt/0001-suppress-MS-compiler-complaint-about-negating-unsign.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From 004f415c5d04dd1f616a953eb8ad078a20b72c58 Mon Sep 17 00:00:00 2001 | ||
From: "Steven G. Johnson" <stevenj@mit.edu> | ||
Date: Sat, 9 May 2020 13:56:40 -0400 | ||
Subject: [PATCH] suppress MS compiler complaint about negating unsigned | ||
(closes #330) | ||
|
||
--- | ||
src/util/sobolseq.c | 7 ++++++- | ||
1 file changed, 6 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/util/sobolseq.c b/src/util/sobolseq.c | ||
index 6626f51..848ff68 100644 | ||
--- a/src/util/sobolseq.c | ||
+++ b/src/util/sobolseq.c | ||
@@ -93,7 +93,12 @@ static unsigned rightzero32(uint32_t n) | ||
const uint32_t a = 0x05f66a47; /* magic number, found by brute force */ | ||
static const unsigned decode[32] = { 0, 1, 2, 26, 23, 3, 15, 27, 24, 21, 19, 4, 12, 16, 28, 6, 31, 25, 22, 14, 20, 18, 11, 5, 30, 13, 17, 10, 29, 9, 8, 7 }; | ||
n = ~n; /* change to rightmost-one problem */ | ||
- n = a * (n & (-n)); /* store in n to make sure mult. is 32 bits */ | ||
+#ifdef _MSC_VER | ||
+#pragma warning(suppress:4146) | ||
+ n = a * (n & (-n)); /* same as below, but suppress spurious warning/error with MS compiler about negating unsigned int */ | ||
+#else | ||
+ n = a * (n & (-n)); /* store in n to make sure mult. is 32 bits */ | ||
+#endif | ||
return decode[n >> 27]; | ||
#endif | ||
} | ||
-- | ||
2.26.2.windows.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
Source: nlopt | ||
Version: 2.6.2 | ||
Version: 2.6.2-1 | ||
Homepage: https://github.com/stevengj/nlopt | ||
Description: a library for nonlinear local and global optimization, for functions with and without gradient information. | ||
Supports: !uwp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters