Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
infinicore
Commits
f23aa206
Commit
f23aa206
authored
Feb 19, 2025
by
YdrMaster
Browse files
issue/63/style: 整理格式,修正格式整理脚本的错误
Signed-off-by:
YdrMaster
<
ydrml@hotmail.com
>
parent
f7137096
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
scripts/format.py
scripts/format.py
+2
-2
src/infiniop/operator.cc
src/infiniop/operator.cc
+6
-3
No files found.
scripts/format.py
View file @
f23aa206
...
...
@@ -91,7 +91,7 @@ def git_added_files():
try
:
# 使用 git diff --cached --name-only 获取所有已添加到暂存区的文件
result
=
subprocess
.
run
(
[
"git"
,
"diff"
,
"--cached"
,
"--name-only"
],
[
"git"
,
"diff"
,
"--cached"
,
"--diff-filter=AMR"
,
"--name-only"
],
capture_output
=
True
,
text
=
True
,
check
=
True
,
...
...
@@ -162,7 +162,7 @@ def main():
if
args
.
ref
is
None
and
args
.
path
is
None
:
# Last commit.
print
(
"{Fore.GREEN}Formating git added files.{Style.RESET_ALL}"
)
print
(
f
"
{
Fore
.
GREEN
}
Formating git added files.
{
Style
.
RESET_ALL
}
"
)
files
=
git_added_files
()
else
:
...
...
src/infiniop/operator.cc
View file @
f23aa206
#include "infiniop/operator.h"
infiniopStatus_t
infiniopGetDescriptorDeviceType
(
InfiniopDescriptor
const
*
desc_ptr
,
infiniDevice_t
*
device_type
)
{
infiniopStatus_t
infiniopGetDescriptorDeviceType
(
InfiniopDescriptor
const
*
desc_ptr
,
infiniDevice_t
*
device_type
)
{
*
device_type
=
desc_ptr
->
device_type
;
return
INFINIOP_STATUS_SUCCESS
;
}
infiniopStatus_t
infiniopGetDescriptorDeviceId
(
InfiniopDescriptor
const
*
desc_ptr
,
int
*
device_id
)
{
infiniopStatus_t
infiniopGetDescriptorDeviceId
(
InfiniopDescriptor
const
*
desc_ptr
,
int
*
device_id
)
{
*
device_id
=
desc_ptr
->
device_id
;
return
INFINIOP_STATUS_SUCCESS
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment