Visual c++

This commit is contained in:
x
2023-03-10 21:14:11 +01:00
parent 631f7ec261
commit 69bd3a2c1e
16 changed files with 1045 additions and 402 deletions

View File

@ -1,2 +1 @@
#define AVX2_ON
#include "bitpack.c" #include "bitpack.c"

View File

@ -1,2 +1 @@
#define AVX2_ON
#include "bitunpack.c" #include "bitunpack.c"

2
vs/bitutil_avx2.c Normal file
View File

@ -0,0 +1,2 @@
#define __AVX2__
#include "bitutil.c"

View File

@ -1,5 +1,5 @@
/* $OpenBSD: getopt_long.c,v 1.23 2007/10/31 12:34:57 chl Exp $ */ /* $OpenBSD: getopt_long.c,v 1.23 2007/10/31 12:34:57 chl Exp $ */
/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */
/* /*
* Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com> * Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com>
@ -57,28 +57,28 @@
#include <stdio.h> #include <stdio.h>
#include <windows.h> #include <windows.h>
#define REPLACE_GETOPT /* use this getopt as the system getopt(3) */ #define REPLACE_GETOPT /* use this getopt as the system getopt(3) */
#ifdef REPLACE_GETOPT #ifdef REPLACE_GETOPT
int opterr = 1; /* if error message should be printed */ int opterr = 1; /* if error message should be printed */
int optind = 1; /* index into parent argv vector */ int optind = 1; /* index into parent argv vector */
int optopt = '?'; /* character checked for validity */ int optopt = '?'; /* character checked for validity */
#undef optreset /* see getopt.h */ #undef optreset /* see getopt.h */
#define optreset __mingw_optreset #define optreset __mingw_optreset
int optreset; /* reset getopt */ int optreset; /* reset getopt */
char *optarg; /* argument associated with option */ char *optarg; /* argument associated with option */
#endif #endif
#define PRINT_ERROR ((opterr) && (*options != ':')) #define PRINT_ERROR ((opterr) && (*options != ':'))
#define FLAG_PERMUTE 0x01 /* permute non-options to the end of argv */ #define FLAG_PERMUTE 0x01 /* permute non-options to the end of argv */
#define FLAG_ALLARGS 0x02 /* treat non-options as args to option "-1" */ #define FLAG_ALLARGS 0x02 /* treat non-options as args to option "-1" */
#define FLAG_LONGONLY 0x04 /* operate as getopt_long_only */ #define FLAG_LONGONLY 0x04 /* operate as getopt_long_only */
/* return values */ /* return values */
#define BADCH (int)'?' #define BADCH (int)'?'
#define BADARG ((*options == ':') ? (int)':' : (int)'?') #define BADARG ((*options == ':') ? (int)':' : (int)'?')
#define INORDER (int)1 #define INORDER (int)1
#ifndef __CYGWIN__ #ifndef __CYGWIN__
#define __progname __argv[0] #define __progname __argv[0]
@ -89,13 +89,13 @@ extern char __declspec(dllimport) *__progname;
#ifdef __CYGWIN__ #ifdef __CYGWIN__
static char EMSG[] = ""; static char EMSG[] = "";
#else #else
#define EMSG "" #define EMSG ""
#endif #endif
static int getopt_internal(int, char * const *, const char *, static int getopt_internal(int, char * const *, const char *,
const struct option *, int *, int); const struct option *, int *, int);
static int parse_long_options(char * const *, const char *, static int parse_long_options(char * const *, const char *,
const struct option *, int *, int); const struct option *, int *, int);
static int gcd(int, int); static int gcd(int, int);
static void permute_args(int, int, int, char * const *); static void permute_args(int, int, int, char * const *);
@ -137,16 +137,16 @@ warnx(const char *fmt,...)
static int static int
gcd(int a, int b) gcd(int a, int b)
{ {
int c; int c;
c = a % b; c = a % b;
while (c != 0) { while (c != 0) {
a = b; a = b;
b = c; b = c;
c = a % b; c = a % b;
} }
return (b); return (b);
} }
/* /*
@ -156,366 +156,366 @@ gcd(int a, int b)
*/ */
static void static void
permute_args(int panonopt_start, int panonopt_end, int opt_end, permute_args(int panonopt_start, int panonopt_end, int opt_end,
char * const *nargv) char * const *nargv)
{ {
int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
char *swap; char *swap;
/* /*
* compute lengths of blocks and number and size of cycles * compute lengths of blocks and number and size of cycles
*/ */
nnonopts = panonopt_end - panonopt_start; nnonopts = panonopt_end - panonopt_start;
nopts = opt_end - panonopt_end; nopts = opt_end - panonopt_end;
ncycle = gcd(nnonopts, nopts); ncycle = gcd(nnonopts, nopts);
cyclelen = (opt_end - panonopt_start) / ncycle; cyclelen = (opt_end - panonopt_start) / ncycle;
for (i = 0; i < ncycle; i++) { for (i = 0; i < ncycle; i++) {
cstart = panonopt_end+i; cstart = panonopt_end+i;
pos = cstart; pos = cstart;
for (j = 0; j < cyclelen; j++) { for (j = 0; j < cyclelen; j++) {
if (pos >= panonopt_end) if (pos >= panonopt_end)
pos -= nnonopts; pos -= nnonopts;
else else
pos += nopts; pos += nopts;
swap = nargv[pos]; swap = nargv[pos];
/* LINTED const cast */ /* LINTED const cast */
((char **) nargv)[pos] = nargv[cstart]; ((char **) nargv)[pos] = nargv[cstart];
/* LINTED const cast */ /* LINTED const cast */
((char **)nargv)[cstart] = swap; ((char **)nargv)[cstart] = swap;
} }
} }
} }
/* /*
* parse_long_options -- * parse_long_options --
* Parse long options in argc/argv argument vector. * Parse long options in argc/argv argument vector.
* Returns -1 if short_too is set and the option does not match long_options. * Returns -1 if short_too is set and the option does not match long_options.
*/ */
static int static int
parse_long_options(char * const *nargv, const char *options, parse_long_options(char * const *nargv, const char *options,
const struct option *long_options, int *idx, int short_too) const struct option *long_options, int *idx, int short_too)
{ {
char *current_argv, *has_equal; char *current_argv, *has_equal;
size_t current_argv_len; size_t current_argv_len;
int i, ambiguous, match; int i, ambiguous, match;
#define IDENTICAL_INTERPRETATION(_x, _y) \ #define IDENTICAL_INTERPRETATION(_x, _y) \
(long_options[(_x)].has_arg == long_options[(_y)].has_arg && \ (long_options[(_x)].has_arg == long_options[(_y)].has_arg && \
long_options[(_x)].flag == long_options[(_y)].flag && \ long_options[(_x)].flag == long_options[(_y)].flag && \
long_options[(_x)].val == long_options[(_y)].val) long_options[(_x)].val == long_options[(_y)].val)
current_argv = place; current_argv = place;
match = -1; match = -1;
ambiguous = 0; ambiguous = 0;
optind++; optind++;
if ((has_equal = strchr(current_argv, '=')) != NULL) { if ((has_equal = strchr(current_argv, '=')) != NULL) {
/* argument found (--option=arg) */ /* argument found (--option=arg) */
current_argv_len = has_equal - current_argv; current_argv_len = has_equal - current_argv;
has_equal++; has_equal++;
} else } else
current_argv_len = strlen(current_argv); current_argv_len = strlen(current_argv);
for (i = 0; long_options[i].name; i++) { for (i = 0; long_options[i].name; i++) {
/* find matching long option */ /* find matching long option */
if (strncmp(current_argv, long_options[i].name, if (strncmp(current_argv, long_options[i].name,
current_argv_len)) current_argv_len))
continue; continue;
if (strlen(long_options[i].name) == current_argv_len) { if (strlen(long_options[i].name) == current_argv_len) {
/* exact match */ /* exact match */
match = i; match = i;
ambiguous = 0; ambiguous = 0;
break; break;
} }
/* /*
* If this is a known short option, don't allow * If this is a known short option, don't allow
* a partial match of a single character. * a partial match of a single character.
*/ */
if (short_too && current_argv_len == 1) if (short_too && current_argv_len == 1)
continue; continue;
if (match == -1) /* partial match */ if (match == -1) /* partial match */
match = i; match = i;
else if (!IDENTICAL_INTERPRETATION(i, match)) else if (!IDENTICAL_INTERPRETATION(i, match))
ambiguous = 1; ambiguous = 1;
} }
if (ambiguous) { if (ambiguous) {
/* ambiguous abbreviation */ /* ambiguous abbreviation */
if (PRINT_ERROR) if (PRINT_ERROR)
warnx(ambig, (int)current_argv_len, warnx(ambig, (int)current_argv_len,
current_argv); current_argv);
optopt = 0; optopt = 0;
return (BADCH); return (BADCH);
} }
if (match != -1) { /* option found */ if (match != -1) { /* option found */
if (long_options[match].has_arg == no_argument if (long_options[match].has_arg == no_argument
&& has_equal) { && has_equal) {
if (PRINT_ERROR) if (PRINT_ERROR)
warnx(noarg, (int)current_argv_len, warnx(noarg, (int)current_argv_len,
current_argv); current_argv);
/* /*
* XXX: GNU sets optopt to val regardless of flag * XXX: GNU sets optopt to val regardless of flag
*/ */
if (long_options[match].flag == NULL) if (long_options[match].flag == NULL)
optopt = long_options[match].val; optopt = long_options[match].val;
else else
optopt = 0; optopt = 0;
return (BADARG); return (BADARG);
} }
if (long_options[match].has_arg == required_argument || if (long_options[match].has_arg == required_argument ||
long_options[match].has_arg == optional_argument) { long_options[match].has_arg == optional_argument) {
if (has_equal) if (has_equal)
optarg = has_equal; optarg = has_equal;
else if (long_options[match].has_arg == else if (long_options[match].has_arg ==
required_argument) { required_argument) {
/* /*
* optional argument doesn't use next nargv * optional argument doesn't use next nargv
*/ */
optarg = nargv[optind++]; optarg = nargv[optind++];
} }
} }
if ((long_options[match].has_arg == required_argument) if ((long_options[match].has_arg == required_argument)
&& (optarg == NULL)) { && (optarg == NULL)) {
/* /*
* Missing argument; leading ':' indicates no error * Missing argument; leading ':' indicates no error
* should be generated. * should be generated.
*/ */
if (PRINT_ERROR) if (PRINT_ERROR)
warnx(recargstring, warnx(recargstring,
current_argv); current_argv);
/* /*
* XXX: GNU sets optopt to val regardless of flag * XXX: GNU sets optopt to val regardless of flag
*/ */
if (long_options[match].flag == NULL) if (long_options[match].flag == NULL)
optopt = long_options[match].val; optopt = long_options[match].val;
else else
optopt = 0; optopt = 0;
--optind; --optind;
return (BADARG); return (BADARG);
} }
} else { /* unknown option */ } else { /* unknown option */
if (short_too) { if (short_too) {
--optind; --optind;
return (-1); return (-1);
} }
if (PRINT_ERROR) if (PRINT_ERROR)
warnx(illoptstring, current_argv); warnx(illoptstring, current_argv);
optopt = 0; optopt = 0;
return (BADCH); return (BADCH);
} }
if (idx) if (idx)
*idx = match; *idx = match;
if (long_options[match].flag) { if (long_options[match].flag) {
*long_options[match].flag = long_options[match].val; *long_options[match].flag = long_options[match].val;
return (0); return (0);
} else } else
return (long_options[match].val); return (long_options[match].val);
#undef IDENTICAL_INTERPRETATION #undef IDENTICAL_INTERPRETATION
} }
/* /*
* getopt_internal -- * getopt_internal --
* Parse argc/argv argument vector. Called by user level routines. * Parse argc/argv argument vector. Called by user level routines.
*/ */
static int static int
getopt_internal(int nargc, char * const *nargv, const char *options, getopt_internal(int nargc, char * const *nargv, const char *options,
const struct option *long_options, int *idx, int flags) const struct option *long_options, int *idx, int flags)
{ {
char *oli; /* option letter list index */ char *oli; /* option letter list index */
int optchar, short_too; int optchar, short_too;
static int posixly_correct = -1; static int posixly_correct = -1;
if (options == NULL) if (options == NULL)
return (-1); return (-1);
/* /*
* XXX Some GNU programs (like cvs) set optind to 0 instead of * XXX Some GNU programs (like cvs) set optind to 0 instead of
* XXX using optreset. Work around this braindamage. * XXX using optreset. Work around this braindamage.
*/ */
if (optind == 0) if (optind == 0)
optind = optreset = 1; optind = optreset = 1;
/* /*
* Disable GNU extensions if POSIXLY_CORRECT is set or options * Disable GNU extensions if POSIXLY_CORRECT is set or options
* string begins with a '+'. * string begins with a '+'.
* *
* CV, 2009-12-14: Check POSIXLY_CORRECT anew if optind == 0 or * CV, 2009-12-14: Check POSIXLY_CORRECT anew if optind == 0 or
* optreset != 0 for GNU compatibility. * optreset != 0 for GNU compatibility.
*/ */
if (posixly_correct == -1 || optreset != 0) if (posixly_correct == -1 || optreset != 0)
posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); posixly_correct = (getenv("POSIXLY_CORRECT") != NULL);
if (*options == '-') if (*options == '-')
flags |= FLAG_ALLARGS; flags |= FLAG_ALLARGS;
else if (posixly_correct || *options == '+') else if (posixly_correct || *options == '+')
flags &= ~FLAG_PERMUTE; flags &= ~FLAG_PERMUTE;
if (*options == '+' || *options == '-') if (*options == '+' || *options == '-')
options++; options++;
optarg = NULL; optarg = NULL;
if (optreset) if (optreset)
nonopt_start = nonopt_end = -1; nonopt_start = nonopt_end = -1;
start: start:
if (optreset || !*place) { /* update scanning pointer */ if (optreset || !*place) { /* update scanning pointer */
optreset = 0; optreset = 0;
if (optind >= nargc) { /* end of argument vector */ if (optind >= nargc) { /* end of argument vector */
place = EMSG; place = EMSG;
if (nonopt_end != -1) { if (nonopt_end != -1) {
/* do permutation, if we have to */ /* do permutation, if we have to */
permute_args(nonopt_start, nonopt_end, permute_args(nonopt_start, nonopt_end,
optind, nargv); optind, nargv);
optind -= nonopt_end - nonopt_start; optind -= nonopt_end - nonopt_start;
} }
else if (nonopt_start != -1) { else if (nonopt_start != -1) {
/* /*
* If we skipped non-options, set optind * If we skipped non-options, set optind
* to the first of them. * to the first of them.
*/ */
optind = nonopt_start; optind = nonopt_start;
} }
nonopt_start = nonopt_end = -1; nonopt_start = nonopt_end = -1;
return (-1); return (-1);
} }
if (*(place = nargv[optind]) != '-' || if (*(place = nargv[optind]) != '-' ||
(place[1] == '\0' && strchr(options, '-') == NULL)) { (place[1] == '\0' && strchr(options, '-') == NULL)) {
place = EMSG; /* found non-option */ place = EMSG; /* found non-option */
if (flags & FLAG_ALLARGS) { if (flags & FLAG_ALLARGS) {
/* /*
* GNU extension: * GNU extension:
* return non-option as argument to option 1 * return non-option as argument to option 1
*/ */
optarg = nargv[optind++]; optarg = nargv[optind++];
return (INORDER); return (INORDER);
} }
if (!(flags & FLAG_PERMUTE)) { if (!(flags & FLAG_PERMUTE)) {
/* /*
* If no permutation wanted, stop parsing * If no permutation wanted, stop parsing
* at first non-option. * at first non-option.
*/ */
return (-1); return (-1);
} }
/* do permutation */ /* do permutation */
if (nonopt_start == -1) if (nonopt_start == -1)
nonopt_start = optind; nonopt_start = optind;
else if (nonopt_end != -1) { else if (nonopt_end != -1) {
permute_args(nonopt_start, nonopt_end, permute_args(nonopt_start, nonopt_end,
optind, nargv); optind, nargv);
nonopt_start = optind - nonopt_start = optind -
(nonopt_end - nonopt_start); (nonopt_end - nonopt_start);
nonopt_end = -1; nonopt_end = -1;
} }
optind++; optind++;
/* process next argument */ /* process next argument */
goto start; goto start;
} }
if (nonopt_start != -1 && nonopt_end == -1) if (nonopt_start != -1 && nonopt_end == -1)
nonopt_end = optind; nonopt_end = optind;
/* /*
* If we have "-" do nothing, if "--" we are done. * If we have "-" do nothing, if "--" we are done.
*/ */
if (place[1] != '\0' && *++place == '-' && place[1] == '\0') { if (place[1] != '\0' && *++place == '-' && place[1] == '\0') {
optind++; optind++;
place = EMSG; place = EMSG;
/* /*
* We found an option (--), so if we skipped * We found an option (--), so if we skipped
* non-options, we have to permute. * non-options, we have to permute.
*/ */
if (nonopt_end != -1) { if (nonopt_end != -1) {
permute_args(nonopt_start, nonopt_end, permute_args(nonopt_start, nonopt_end,
optind, nargv); optind, nargv);
optind -= nonopt_end - nonopt_start; optind -= nonopt_end - nonopt_start;
} }
nonopt_start = nonopt_end = -1; nonopt_start = nonopt_end = -1;
return (-1); return (-1);
} }
} }
/* /*
* Check long options if: * Check long options if:
* 1) we were passed some * 1) we were passed some
* 2) the arg is not just "-" * 2) the arg is not just "-"
* 3) either the arg starts with -- we are getopt_long_only() * 3) either the arg starts with -- we are getopt_long_only()
*/ */
if (long_options != NULL && place != nargv[optind] && if (long_options != NULL && place != nargv[optind] &&
(*place == '-' || (flags & FLAG_LONGONLY))) { (*place == '-' || (flags & FLAG_LONGONLY))) {
short_too = 0; short_too = 0;
if (*place == '-') if (*place == '-')
place++; /* --foo long option */ place++; /* --foo long option */
else if (*place != ':' && strchr(options, *place) != NULL) else if (*place != ':' && strchr(options, *place) != NULL)
short_too = 1; /* could be short option too */ short_too = 1; /* could be short option too */
optchar = parse_long_options(nargv, options, long_options, optchar = parse_long_options(nargv, options, long_options,
idx, short_too); idx, short_too);
if (optchar != -1) { if (optchar != -1) {
place = EMSG; place = EMSG;
return (optchar); return (optchar);
} }
} }
if ((optchar = (int)*place++) == (int)':' || if ((optchar = (int)*place++) == (int)':' ||
(optchar == (int)'-' && *place != '\0') || (optchar == (int)'-' && *place != '\0') ||
(oli = strchr(options, optchar)) == NULL) { (oli = strchr(options, optchar)) == NULL) {
/* /*
* If the user specified "-" and '-' isn't listed in * If the user specified "-" and '-' isn't listed in
* options, return -1 (non-option) as per POSIX. * options, return -1 (non-option) as per POSIX.
* Otherwise, it is an unknown option character (or ':'). * Otherwise, it is an unknown option character (or ':').
*/ */
if (optchar == (int)'-' && *place == '\0') if (optchar == (int)'-' && *place == '\0')
return (-1); return (-1);
if (!*place) if (!*place)
++optind; ++optind;
if (PRINT_ERROR) if (PRINT_ERROR)
warnx(illoptchar, optchar); warnx(illoptchar, optchar);
optopt = optchar; optopt = optchar;
return (BADCH); return (BADCH);
} }
if (long_options != NULL && optchar == 'W' && oli[1] == ';') { if (long_options != NULL && optchar == 'W' && oli[1] == ';') {
/* -W long-option */ /* -W long-option */
if (*place) /* no space */ if (*place) /* no space */
/* NOTHING */; /* NOTHING */;
else if (++optind >= nargc) { /* no arg */ else if (++optind >= nargc) { /* no arg */
place = EMSG; place = EMSG;
if (PRINT_ERROR) if (PRINT_ERROR)
warnx(recargchar, optchar); warnx(recargchar, optchar);
optopt = optchar; optopt = optchar;
return (BADARG); return (BADARG);
} else /* white space */ } else /* white space */
place = nargv[optind]; place = nargv[optind];
optchar = parse_long_options(nargv, options, long_options, optchar = parse_long_options(nargv, options, long_options,
idx, 0); idx, 0);
place = EMSG; place = EMSG;
return (optchar); return (optchar);
} }
if (*++oli != ':') { /* doesn't take argument */ if (*++oli != ':') { /* doesn't take argument */
if (!*place) if (!*place)
++optind; ++optind;
} else { /* takes (optional) argument */ } else { /* takes (optional) argument */
optarg = NULL; optarg = NULL;
if (*place) /* no white space */ if (*place) /* no white space */
optarg = place; optarg = place;
else if (oli[1] != ':') { /* arg not optional */ else if (oli[1] != ':') { /* arg not optional */
if (++optind >= nargc) { /* no arg */ if (++optind >= nargc) { /* no arg */
place = EMSG; place = EMSG;
if (PRINT_ERROR) if (PRINT_ERROR)
warnx(recargchar, optchar); warnx(recargchar, optchar);
optopt = optchar; optopt = optchar;
return (BADARG); return (BADARG);
} else } else
optarg = nargv[optind]; optarg = nargv[optind];
} }
place = EMSG; place = EMSG;
++optind; ++optind;
} }
/* dump back option letter */ /* dump back option letter */
return (optchar); return (optchar);
} }
#ifdef REPLACE_GETOPT #ifdef REPLACE_GETOPT
/* /*
* getopt -- * getopt --
* Parse argc/argv argument vector. * Parse argc/argv argument vector.
* *
* [eventually this will replace the BSD getopt] * [eventually this will replace the BSD getopt]
*/ */
@ -523,40 +523,40 @@ int
getopt(int nargc, char * const *nargv, const char *options) getopt(int nargc, char * const *nargv, const char *options)
{ {
/* /*
* We don't pass FLAG_PERMUTE to getopt_internal() since * We don't pass FLAG_PERMUTE to getopt_internal() since
* the BSD getopt(3) (unlike GNU) has never done this. * the BSD getopt(3) (unlike GNU) has never done this.
* *
* Furthermore, since many privileged programs call getopt() * Furthermore, since many privileged programs call getopt()
* before dropping privileges it makes sense to keep things * before dropping privileges it makes sense to keep things
* as simple (and bug-free) as possible. * as simple (and bug-free) as possible.
*/ */
return (getopt_internal(nargc, nargv, options, NULL, NULL, 0)); return (getopt_internal(nargc, nargv, options, NULL, NULL, 0));
} }
#endif /* REPLACE_GETOPT */ #endif /* REPLACE_GETOPT */
/* /*
* getopt_long -- * getopt_long --
* Parse argc/argv argument vector. * Parse argc/argv argument vector.
*/ */
int int
getopt_long(int nargc, char * const *nargv, const char *options, getopt_long(int nargc, char * const *nargv, const char *options,
const struct option *long_options, int *idx) const struct option *long_options, int *idx)
{ {
return (getopt_internal(nargc, nargv, options, long_options, idx, return (getopt_internal(nargc, nargv, options, long_options, idx,
FLAG_PERMUTE)); FLAG_PERMUTE));
} }
/* /*
* getopt_long_only -- * getopt_long_only --
* Parse argc/argv argument vector. * Parse argc/argv argument vector.
*/ */
int int
getopt_long_only(int nargc, char * const *nargv, const char *options, getopt_long_only(int nargc, char * const *nargv, const char *options,
const struct option *long_options, int *idx) const struct option *long_options, int *idx)
{ {
return (getopt_internal(nargc, nargv, options, long_options, idx, return (getopt_internal(nargc, nargv, options, long_options, idx,
FLAG_PERMUTE|FLAG_LONGONLY)); FLAG_PERMUTE|FLAG_LONGONLY));
} }

View File

@ -21,12 +21,12 @@
extern "C" { extern "C" {
#endif #endif
extern int optind; /* index of first non-option in argv */ extern int optind; /* index of first non-option in argv */
extern int optopt; /* single option character, as parsed */ extern int optopt; /* single option character, as parsed */
extern int opterr; /* flag to enable built-in diagnostics... */ extern int opterr; /* flag to enable built-in diagnostics... */
/* (user may set to zero, to suppress) */ /* (user may set to zero, to suppress) */
extern char *optarg; /* pointer to argument of current option */ extern char *optarg; /* pointer to argument of current option */
extern int getopt(int nargc, char * const *nargv, const char *options); extern int getopt(int nargc, char * const *nargv, const char *options);
@ -61,19 +61,19 @@ extern int optreset;
extern "C" { extern "C" {
#endif #endif
struct option /* specification for a long form option... */ struct option /* specification for a long form option... */
{ {
const char *name; /* option name, without leading hyphens */ const char *name; /* option name, without leading hyphens */
int has_arg; /* does it take an argument? */ int has_arg; /* does it take an argument? */
int *flag; /* where to save its status, or NULL */ int *flag; /* where to save its status, or NULL */
int val; /* its associated status value */ int val; /* its associated status value */
}; };
enum /* permitted values for its `has_arg' field... */ enum /* permitted values for its `has_arg' field... */
{ {
no_argument = 0, /* option never takes an argument */ no_argument = 0, /* option never takes an argument */
required_argument, /* option always requires an argument */ required_argument, /* option always requires an argument */
optional_argument /* option may take an argument */ optional_argument /* option may take an argument */
}; };
extern int getopt_long(int nargc, char * const *nargv, const char *options, extern int getopt_long(int nargc, char * const *nargv, const char *options,
@ -87,7 +87,7 @@ extern int getopt_long_only(int nargc, char * const *nargv, const char *options,
/* /*
* ...for the long form API only; keep this for compatibility. * ...for the long form API only; keep this for compatibility.
*/ */
# define HAVE_DECL_GETOPT 1 # define HAVE_DECL_GETOPT 1
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -1,2 +1 @@
#define AVX2_ON
#include "transpose.c" #include "transpose.c"

View File

@ -1,2 +1 @@
#define SSE2_ON
#include "transpose.c" #include "transpose.c"

View File

@ -1,2 +1 @@
#define AVX2_ON
#include "vp4c.c" #include "vp4c.c"

View File

@ -1,2 +1 @@
#define AVX2_ON
#include "vp4d.c" #include "vp4d.c"

41
vs/vs2022/TurboPFor.sln Normal file
View File

@ -0,0 +1,41 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.757
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TurboPFor", "TurboPFor.vcxproj", "{A162F37F-183F-4250-88AB-9B9FBDE30B04}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icapp", "icapp.vcxproj", "{6876BEB8-2B45-48B9-8381-1D4094FE8868}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A162F37F-183F-4250-88AB-9B9FBDE30B04}.Debug|x64.ActiveCfg = Debug|x64
{A162F37F-183F-4250-88AB-9B9FBDE30B04}.Debug|x64.Build.0 = Debug|x64
{A162F37F-183F-4250-88AB-9B9FBDE30B04}.Debug|x86.ActiveCfg = Debug|Win32
{A162F37F-183F-4250-88AB-9B9FBDE30B04}.Debug|x86.Build.0 = Debug|Win32
{A162F37F-183F-4250-88AB-9B9FBDE30B04}.Release|x64.ActiveCfg = Release|x64
{A162F37F-183F-4250-88AB-9B9FBDE30B04}.Release|x64.Build.0 = Release|x64
{A162F37F-183F-4250-88AB-9B9FBDE30B04}.Release|x86.ActiveCfg = Release|Win32
{A162F37F-183F-4250-88AB-9B9FBDE30B04}.Release|x86.Build.0 = Release|Win32
{6876BEB8-2B45-48B9-8381-1D4094FE8868}.Debug|x64.ActiveCfg = Debug|x64
{6876BEB8-2B45-48B9-8381-1D4094FE8868}.Debug|x64.Build.0 = Debug|x64
{6876BEB8-2B45-48B9-8381-1D4094FE8868}.Debug|x86.ActiveCfg = Debug|Win32
{6876BEB8-2B45-48B9-8381-1D4094FE8868}.Debug|x86.Build.0 = Debug|Win32
{6876BEB8-2B45-48B9-8381-1D4094FE8868}.Release|x64.ActiveCfg = Release|x64
{6876BEB8-2B45-48B9-8381-1D4094FE8868}.Release|x64.Build.0 = Release|x64
{6876BEB8-2B45-48B9-8381-1D4094FE8868}.Release|x86.ActiveCfg = Release|Win32
{6876BEB8-2B45-48B9-8381-1D4094FE8868}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A02524FA-10E2-4E1C-BE79-0AE7B077D2CE}
EndGlobalSection
EndGlobal

259
vs/vs2022/TurboPFor.vcxproj Normal file
View File

@ -0,0 +1,259 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{A162F37F-183F-4250-88AB-9B9FBDE30B04}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>TurboPFor</RootNamespace>
<ProjectName>TurboPFor</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IntDir>$(SolutionDir)msvc.build\.obj\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir>
<OutDir>$(SolutionDir)msvc.build\$(Platform)-$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IntDir>$(SolutionDir)msvc.build\.obj\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir>
<OutDir>$(SolutionDir)msvc.build\$(Platform)-$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)msvc.build\.obj\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir>
<OutDir>$(SolutionDir)msvc.build\$(Platform)-$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)msvc.build\.obj\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir>
<OutDir>$(SolutionDir)msvc.build\$(Platform)-$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>__SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions Condition="'$(PlatformToolset)'!='ClangCL'">/w24003 /w24005 /w24028 /w24047 /w24090 /w24133 /w24146 /w24333 /w24789 %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(PlatformToolset)'=='ClangCL'">-Wno-parentheses -Wno-unused-variable -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-tautological-constant-out-of-range-compare -Wno-pointer-sign -Wno-array-bounds -Wno-implicit-int -Wno-unused-label -Wno-uninitialized -Wno-missing-braces -Wno-int-conversion -Wno-macro-redefined -Wno-unknown-pragmas -Wno-shift-op-parentheses -Wno-compare-distinct-pointer-types %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>../..</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>__SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions Condition="'$(PlatformToolset)'!='ClangCL'">/w24003 /w24005 /w24028 /w24047 /w24090 /w24133 /w24146 /w24333 /w24789 %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(PlatformToolset)'=='ClangCL'">-Wno-parentheses -Wno-unused-variable -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-tautological-constant-out-of-range-compare -Wno-pointer-sign -Wno-array-bounds -Wno-implicit-int -Wno-unused-label -Wno-uninitialized -Wno-missing-braces -Wno-int-conversion -Wno-macro-redefined -Wno-unknown-pragmas -Wno-shift-op-parentheses -Wno-compare-distinct-pointer-types %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>../..</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>__SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;__AVX__;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions Condition="'$(PlatformToolset)'!='ClangCL'">/w24003 /w24005 /w24028 /w24047 /w24090 /w24133 /w24146 /w24333 /w24789 %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(PlatformToolset)'=='ClangCL'">-Wno-parentheses -Wno-unused-variable -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-tautological-constant-out-of-range-compare -Wno-pointer-sign -Wno-array-bounds -Wno-implicit-int -Wno-unused-label -Wno-uninitialized -Wno-missing-braces -Wno-int-conversion -Wno-macro-redefined -Wno-unknown-pragmas -Wno-shift-op-parentheses -Wno-compare-distinct-pointer-types %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>../..</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>__SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions Condition="'$(PlatformToolset)'!='ClangCL'">/w24003 /w24005 /w24028 /w24047 /w24090 /w24133 /w24146 /w24333 /w24789 %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(PlatformToolset)'=='ClangCL'">-Wno-parentheses -Wno-unused-variable -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-tautological-constant-out-of-range-compare -Wno-pointer-sign -Wno-array-bounds -Wno-implicit-int -Wno-unused-label -Wno-uninitialized -Wno-missing-braces -Wno-int-conversion -Wno-macro-redefined -Wno-unknown-pragmas -Wno-shift-op-parentheses -Wno-compare-distinct-pointer-types %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>../..</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\bic.c" />
<ClCompile Include="..\..\bitpack.c">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">__SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;__AVX__;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExceptionHandling>
</ClCompile>
<ClCompile Include="..\..\bitunpack.c" />
<ClCompile Include="..\..\bitutil.c">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">__SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;__AVX__;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\eliasfano.c" />
<ClCompile Include="..\..\fp.c" />
<ClCompile Include="..\..\lz.c" />
<ClCompile Include="..\..\transpose.c">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG</PreprocessorDefinitions>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NoExtensions</EnableEnhancedInstructionSet>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_CRT_SECURE_NO_WARNINGS=;_CONSOLE;_DEBUG</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\trlec.c" />
<ClCompile Include="..\..\trled.c" />
<ClCompile Include="..\..\v8.c">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">__SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;__AVX__;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\v8pack.c">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">__SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;__AVX__;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\..\vbit.c" />
<ClCompile Include="..\..\vint.c" />
<ClCompile Include="..\..\vp4c.c" />
<ClCompile Include="..\..\vp4d.c" />
<ClCompile Include="..\..\vsimple.c" />
<ClCompile Include="..\bitpack_avx2.c">
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\bitunpack_avx2.c">
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\bitutil_avx2.c">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">__AVX2__;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\transpose_avx2.c">
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\transpose_sse.c">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">__SSE__;__SSE2__;__SSE3__;__SSSE3__;__SSE4_1__;__SSE4_2__;___AVX___;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\vp4c_avx2.c">
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\vp4d_avx2.c">
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">__AVX2__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\include\bic.h" />
<ClInclude Include="..\..\..\include\bitpack.h" />
<ClInclude Include="..\..\..\include\bitutil.h" />
<ClInclude Include="..\..\..\include\conf.h" />
<ClInclude Include="..\..\..\include\eliasfano.h" />
<ClInclude Include="..\..\..\include\fp.h" />
<ClInclude Include="..\..\..\include\ic.h" />
<ClInclude Include="..\..\..\include\transpose.h" />
<ClInclude Include="..\..\..\include\trle.h" />
<ClInclude Include="..\..\..\include\vint.h" />
<ClInclude Include="..\..\..\include\vlcbit.h" />
<ClInclude Include="..\..\..\include\vlcbyte.h" />
<ClInclude Include="..\..\..\include\vp4.h" />
<ClInclude Include="..\..\..\include\vsimple.h" />
<ClInclude Include="..\..\..\include_\bitutil_.h" />
<ClInclude Include="..\..\bitpack.h" />
<ClInclude Include="..\..\transpose.h" />
<ClInclude Include="..\..\trle.h" />
<ClInclude Include="..\..\vint.h" />
<ClInclude Include="..\..\vp4.h" />
<ClInclude Include="..\..\vsimple.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\bitunpack.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\bitpack.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\vp4d.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\vp4c.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\bitutil.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\fp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\vint.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\vsimple.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\trlec.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\trled.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\bitpack_avx2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\bitunpack_avx2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\transpose_avx2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\transpose_sse.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\vp4c_avx2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\vp4d_avx2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\v8.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\v8pack.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\lz.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\bic.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\eliasfano.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\vbit.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\bitutil_avx2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\transpose.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\bitpack.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\transpose.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\vint.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\vp4.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\vsimple.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\trle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\bic.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\bitpack.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\bitutil.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\conf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\eliasfano.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\fp.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\ic.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\transpose.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\trle.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\vint.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\vlcbit.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\vlcbyte.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\vp4.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\vsimple.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include_\bitutil_.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

174
vs/vs2022/icapp.vcxproj Normal file
View File

@ -0,0 +1,174 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\icapp.c" />
<ClCompile Include="..\getopt.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="TurboPFor.vcxproj">
<Project>{a162f37f-183f-4250-88ab-9b9fbde30b04}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{6876BEB8-2B45-48B9-8381-1D4094FE8868}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>icapp</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)msvc.build\$(Platform)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)msvc.build\.obj\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)msvc.build\$(Platform)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)msvc.build\.obj\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)msvc.build\$(Platform)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)msvc.build\.obj\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)msvc.build\$(Platform)-$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)msvc.build\.obj\$(Platform)-$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS=;_CONSOLE;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalOptions Condition="'$(PlatformToolset)'!='ClangCL'">/w24146 /w24133 /w24996</AdditionalOptions>
<AdditionalOptions Condition="'$(PlatformToolset)'=='ClangCL'">-Wno-parentheses -Wno-unused-variable -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-tautological-constant-out-of-range-compare -Wno-pointer-sign -Wno-unused-label -Wno-unused-function -Wno-logical-op-parentheses -Wno-pointer-type-mismatch -Wno-sometimes-uninitialized</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<AdditionalIncludeDirectories>..\..\ext</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>CODEC2;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalOptions Condition="'$(PlatformToolset)'!='ClangCL'">/w24146 /w24133 /w24996</AdditionalOptions>
<AdditionalOptions Condition="'$(PlatformToolset)'=='ClangCL'">-Wno-parentheses -Wno-unused-variable -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-tautological-constant-out-of-range-compare -Wno-pointer-sign -Wno-unused-label -Wno-unused-function -Wno-logical-op-parentheses -Wno-pointer-type-mismatch -Wno-sometimes-uninitialized</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<AdditionalIncludeDirectories>..\..\ext</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalOptions Condition="'$(PlatformToolset)'!='ClangCL'">/w24146 /w24133 /w24996</AdditionalOptions>
<AdditionalOptions Condition="'$(PlatformToolset)'=='ClangCL'">-Wno-parentheses -Wno-unused-variable -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-tautological-constant-out-of-range-compare -Wno-pointer-sign -Wno-unused-label -Wno-unused-function -Wno-logical-op-parentheses -Wno-pointer-type-mismatch -Wno-sometimes-uninitialized</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<AdditionalIncludeDirectories>..\..\ext</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>CODEC2;_CRT_SECURE_NO_WARNINGS=;_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalOptions Condition="'$(PlatformToolset)'!='ClangCL'">/w24146 /w24133 /w24996</AdditionalOptions>
<AdditionalOptions Condition="'$(PlatformToolset)'=='ClangCL'">-Wno-parentheses -Wno-unused-variable -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-tautological-constant-out-of-range-compare -Wno-pointer-sign -Wno-unused-label -Wno-unused-function -Wno-logical-op-parentheses -Wno-pointer-type-mismatch -Wno-sometimes-uninitialized</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
<AdditionalIncludeDirectories>..\..\ext</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\icapp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\getopt.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>