aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlagrunge <lagrunge@yandex-team.ru>2022-02-10 16:51:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:51:40 +0300
commitdbecdfc04950058596c98da27440fe7fc105b5f6 (patch)
tree3cbc721ecacceeda3516a9f80572e52458cc8a1b
parent368058fa36ac29dde5ef05db66072c998a47fb58 (diff)
downloadydb-dbecdfc04950058596c98da27440fe7fc105b5f6.tar.gz
Restoring authorship annotation for <lagrunge@yandex-team.ru>. Commit 1 of 2.
-rw-r--r--build/plugins/build_mn_files.py2
-rwxr-xr-xbuild/scripts/build_mn.py32
-rw-r--r--build/ymake.core.conf6
-rw-r--r--util/generic/typetraits.h2
-rw-r--r--util/generic/typetraits_ut.cpp24
5 files changed, 33 insertions, 33 deletions
diff --git a/build/plugins/build_mn_files.py b/build/plugins/build_mn_files.py
index 4da76f18528..ee79eb44f24 100644
--- a/build/plugins/build_mn_files.py
+++ b/build/plugins/build_mn_files.py
@@ -24,6 +24,6 @@ def on_build_mns_files(unit, *args):
for filename in files:
file_basename, _ = splitext(basename(filename))
- asmdataname = "staticMn{0}{1}Ptr".format(ranking_suffix, file_basename)
+ asmdataname = "staticMn{0}{1}Ptr".format(ranking_suffix, file_basename)
output_name = 'mn.staticMn{0}{1}Ptr.cpp'.format(ranking_suffix, file_basename)
unit.on_build_mns_file([filename, name, output_name, ranking_suffix, check, fml_unused_tool, asmdataname])
diff --git a/build/scripts/build_mn.py b/build/scripts/build_mn.py
index 5bb03c247c9..2669dde35e3 100755
--- a/build/scripts/build_mn.py
+++ b/build/scripts/build_mn.py
@@ -16,7 +16,7 @@ def get_value(val):
class BuildMnBase(object):
- def Run(self, mninfo, mnname, mnrankingSuffix, mncppPath, check=False, ptr=False, multi=False):
+ def Run(self, mninfo, mnname, mnrankingSuffix, mncppPath, check=False, ptr=False, multi=False):
self.mninfo = mninfo
self.mnname = mnname
self.mnrankingSuffix = mnrankingSuffix
@@ -24,10 +24,10 @@ class BuildMnBase(object):
self.check = check
self.ptr = ptr
self.multi = multi
- dataprefix = "MN_External_"
- mninfoName = os.path.basename(self.mninfo)
- data = dataprefix + mnname
- datasize = data + "Size"
+ dataprefix = "MN_External_"
+ mninfoName = os.path.basename(self.mninfo)
+ data = dataprefix + mnname
+ datasize = data + "Size"
if self.multi:
if self.ptr:
@@ -39,10 +39,10 @@ class BuildMnBase(object):
else:
if self.ptr:
mntype = "const NMatrixnet::TMnSsePtr"
- mnload = "(new NMatrixnet::TMnSseInfo({1}, {2}, \"{0}\"))".format(mninfoName, data, datasize)
+ mnload = "(new NMatrixnet::TMnSseInfo({1}, {2}, \"{0}\"))".format(mninfoName, data, datasize)
else:
mntype = "const NMatrixnet::TMnSseInfo"
- mnload = "({1}, {2}, \"{0}\")".format(mninfoName, data, datasize)
+ mnload = "({1}, {2}, \"{0}\")".format(mninfoName, data, datasize)
if self.check:
self.CheckMn()
@@ -54,16 +54,16 @@ class BuildMnBase(object):
mncpptmp.write("#include <kernel/matrixnet/mn_multi_categ.h>\n")
else:
mncpptmp.write("#include <kernel/matrixnet/mn_sse.h>\n")
-
- rodatapath = os.path.dirname(self.mncppPath) + "/" + dataprefix + self.mnname + ".rodata"
- mncpptmp.write("namespace{\n")
- mncpptmp.write(" extern \"C\" {\n")
- mncpptmp.write(" extern const unsigned char {1}{0}[];\n".format(self.mnname, dataprefix))
- mncpptmp.write(" extern const ui32 {1}{0}Size;\n".format(self.mnname, dataprefix))
- mncpptmp.write(" }\n")
- mncpptmp.write("}\n")
+
+ rodatapath = os.path.dirname(self.mncppPath) + "/" + dataprefix + self.mnname + ".rodata"
+ mncpptmp.write("namespace{\n")
+ mncpptmp.write(" extern \"C\" {\n")
+ mncpptmp.write(" extern const unsigned char {1}{0}[];\n".format(self.mnname, dataprefix))
+ mncpptmp.write(" extern const ui32 {1}{0}Size;\n".format(self.mnname, dataprefix))
+ mncpptmp.write(" }\n")
+ mncpptmp.write("}\n")
archiverCall = subprocess.Popen([self.archiver, "-q", "-p", "-o", rodatapath, self.mninfo], stdout=None, stderr=subprocess.PIPE)
- archiverCall.wait()
+ archiverCall.wait()
mncpptmp.write("extern {0} {1};\n".format(mntype, self.mnname))
mncpptmp.write("{0} {1}{2};".format(mntype, self.mnname, mnload))
mncpptmp.close()
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 081833998b8..1a8f8f7f209 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -6843,8 +6843,8 @@ BUILD_MN_SCRIPT=build/scripts/build_mn.py
### Alternative macro BUILD_MNS() works faster and better for large files.
macro BUILD_MN(MnInfo, MnName, CHECK?"fml_tool=$FML_UNUSED_TOOL CHECK":"", MULTI?, PTR?, RANKING_SUFFIX="") {
.CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnF $ARCADIA_ROOT $ARCH_TOOL ${input:MnInfo} $MnName ranking_suffix=$RANKING_SUFFIX ${output;chksum;pre=mn.:MnName.cpp} ${output;hide;pre=MN_External_;suf=.rodata:MnName} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} $CHECK $MULTI $PTR ${kv;hide:"p MN"} ${kv;hide:"pc yellow"}
-}
-
+}
+
macro _BUILD_MNS_FILE(Input, Name, Output, Suffix, Check, Fml_tool, AsmDataName) {
.CMD=$YMAKE_PYTHON ${input:BUILD_MN_SCRIPT} BuildMnsFilesF $ARCADIA_ROOT $BINDIR $ARCH_TOOL fml_tool=$Fml_tool $Name ranking_suffix=$Suffix ${input:Input} ${output;hide:Output} ${output;hide;pre=MN_External_;suf=.rodata:AsmDataName} ${output_include;hide:"kernel/matrixnet/mn_sse.h"} ${kv;hide:"p MN"} ${kv;hide:"pc yellow"}
}
@@ -6860,7 +6860,7 @@ macro _BUILD_MNS_HEADER(NAME="", CHECK?, RANKING_SUFFIX="", Files...) {
}
# TODO: support foreach_in and keywords simultaneous usage (look at BUILD_MNS_FILES)
-
+
# tag:matrixnet
### @usage: BUILD_MNS([CHECK] NAME listname mninfos...) # matrixnet
###
diff --git a/util/generic/typetraits.h b/util/generic/typetraits.h
index d165bd1a068..f10f7ef8a8b 100644
--- a/util/generic/typetraits.h
+++ b/util/generic/typetraits.h
@@ -163,7 +163,7 @@ class TTypeTraits<void>: public TTypeTraitsBase<void> {};
: TBaseHas##name<T, std::is_class<T>::value || std::is_union<T>::value> {}
#define Y_HAS_MEMBER_IMPL_1(name) Y_HAS_MEMBER_IMPL_2(name, name)
-
+
/* @def Y_HAS_MEMBER
*
* This macro should be used to define compile-time introspection helper classes for template
diff --git a/util/generic/typetraits_ut.cpp b/util/generic/typetraits_ut.cpp
index e7571c75ece..dacbe0c618c 100644
--- a/util/generic/typetraits_ut.cpp
+++ b/util/generic/typetraits_ut.cpp
@@ -421,24 +421,24 @@ Y_UNIT_TEST_SUITE(TTypeTraitsTestNg) {
TYPE_TEST(NonPodClassReference, TNonPodClass&)
TYPE_TEST(NonPodClassConstReference, const TNonPodClass&)
}
-
-enum E4 {
- X
-};
-
+
+enum E4 {
+ X
+};
+
enum class E64: ui64 {
- X
-};
-
+ X
+};
+
enum class E8: ui8 {
- X
-};
-
+ X
+};
+
// test for std::underlying_type_t
static_assert(sizeof(std::underlying_type_t<E4>) == sizeof(int), "");
static_assert(sizeof(std::underlying_type_t<E64>) == sizeof(ui64), "");
static_assert(sizeof(std::underlying_type_t<E8>) == sizeof(ui8), "");
-
+
// tests for TFixedWidthUnsignedInt
static_assert(std::is_same<ui8, TFixedWidthUnsignedInt<i8>>::value, "");
static_assert(std::is_same<ui16, TFixedWidthUnsignedInt<i16>>::value, "");