mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-02-17 02:38:41 +00:00
test namespace only
This commit is contained in:
parent
24cf23f026
commit
04ab177b23
|
|
@ -117,18 +117,16 @@
|
||||||
|
|
||||||
namespace Hash {
|
namespace Hash {
|
||||||
namespace Meow {
|
namespace Meow {
|
||||||
#if !defined(MEOW_HASH_X64_AESNI_H)
|
|
||||||
|
|
||||||
#define MEOW_HASH_VERSION 5
|
#define MEOW_HASH_VERSION 5
|
||||||
#define MEOW_HASH_VERSION_NAME "0.5/calico"
|
#define MEOW_HASH_VERSION_NAME "0.5/calico"
|
||||||
|
|
||||||
#if !defined(meow_u8)
|
#if !defined(meow_u8)
|
||||||
|
|
||||||
#if _MSC_VER
|
#if _MSC_VER
|
||||||
#if !defined(__clang__)
|
#if !defined(__clang__)
|
||||||
#define INSTRUCTION_REORDER_BARRIER _ReadWriteBarrier()
|
#define INSTRUCTION_REORDER_BARRIER _ReadWriteBarrier()
|
||||||
#else
|
#else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
#else
|
#else
|
||||||
#include <x86intrin.h>
|
#include <x86intrin.h>
|
||||||
|
|
@ -166,7 +164,6 @@ namespace Hash {
|
||||||
#if !defined MEOW_PREFETCH_LIMIT
|
#if !defined MEOW_PREFETCH_LIMIT
|
||||||
#define MEOW_PREFETCH_LIMIT 0x3ff
|
#define MEOW_PREFETCH_LIMIT 0x3ff
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define prefetcht0(A) _mm_prefetch((char *)(A), _MM_HINT_T0)
|
#define prefetcht0(A) _mm_prefetch((char *)(A), _MM_HINT_T0)
|
||||||
|
|
@ -742,9 +739,6 @@ namespace Hash {
|
||||||
}
|
}
|
||||||
MeowEnd(&State, SeedResult);
|
MeowEnd(&State, SeedResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MEOW_HASH_X64_AESNI_H
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -17,11 +17,8 @@
|
||||||
#include "StringUtils.h"
|
#include "StringUtils.h"
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
class ArrayUtils {
|
namespace ArrayUtils {
|
||||||
private:
|
inline
|
||||||
|
|
||||||
public:
|
|
||||||
static inline
|
|
||||||
char* get_arg(const char *id, char **argv, int length)
|
char* get_arg(const char *id, char **argv, int length)
|
||||||
{
|
{
|
||||||
if (Utils::StringUtils::is_number(id)) {
|
if (Utils::StringUtils::is_number(id)) {
|
||||||
|
|
@ -37,7 +34,7 @@ namespace Utils {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline
|
inline
|
||||||
bool has_arg(const char *id, char **argv, int length)
|
bool has_arg(const char *id, char **argv, int length)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < length; ++i) {
|
for (int i = 0; i < length; ++i) {
|
||||||
|
|
@ -48,7 +45,6 @@ namespace Utils {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -28,11 +28,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
class FileUtils {
|
namespace FileUtils {
|
||||||
private:
|
inline
|
||||||
|
|
||||||
public:
|
|
||||||
static inline
|
|
||||||
bool file_exists (char *filename)
|
bool file_exists (char *filename)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
@ -47,7 +44,7 @@ namespace Utils {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline
|
inline
|
||||||
time_t last_modification (char *filename)
|
time_t last_modification (char *filename)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
@ -91,7 +88,7 @@ namespace Utils {
|
||||||
int size;
|
int size;
|
||||||
} file_body;
|
} file_body;
|
||||||
|
|
||||||
static inline
|
inline
|
||||||
file_body read_file (char *filename)
|
file_body read_file (char *filename)
|
||||||
{
|
{
|
||||||
file_body file = {0};
|
file_body file = {0};
|
||||||
|
|
@ -116,7 +113,6 @@ namespace Utils {
|
||||||
|
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -17,11 +17,8 @@
|
||||||
#include "ArraySort.h"
|
#include "ArraySort.h"
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
class StringUtils {
|
namespace StringUtils {
|
||||||
private:
|
inline
|
||||||
|
|
||||||
public:
|
|
||||||
static inline
|
|
||||||
bool is_number(const char *s)
|
bool is_number(const char *s)
|
||||||
{
|
{
|
||||||
while (*s != '\0') {
|
while (*s != '\0') {
|
||||||
|
|
@ -41,7 +38,6 @@ namespace Utils {
|
||||||
int size;
|
int size;
|
||||||
} text_diff;
|
} text_diff;
|
||||||
|
|
||||||
static
|
|
||||||
text_diff computeLCSDiff (char **from, int fromSize, char **to, int toSize)
|
text_diff computeLCSDiff (char **from, int fromSize, char **to, int toSize)
|
||||||
{
|
{
|
||||||
char **diffValues = malloc(fromSize * toSize * sizeof(char *));
|
char **diffValues = malloc(fromSize * toSize * sizeof(char *));
|
||||||
|
|
@ -140,7 +136,6 @@ namespace Utils {
|
||||||
|
|
||||||
return text_diff { diffValues, diffMasks, diffIndex };
|
return text_diff { diffValues, diffMasks, diffIndex };
|
||||||
}
|
}
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Loading…
Reference in New Issue
Block a user