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
4ee4c4f4
Commit
4ee4c4f4
authored
Feb 25, 2025
by
PanZezhong
Browse files
issue/69 增加获得全设备数量接口
parent
b4eadd81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
include/infinicore.h
include/infinicore.h
+2
-2
include/infinirt.h
include/infinirt.h
+4
-3
No files found.
include/infinicore.h
View file @
4ee4c4f4
#ifndef __INFINICORE_H__
#ifndef __INFINICORE_H__
#define __INFINICORE_H__
#define __INFINICORE_H__
#include <stdint.h>
#if defined(_WIN32)
#if defined(_WIN32)
#define __export __declspec(dllexport)
#define __export __declspec(dllexport)
...
@@ -15,7 +14,7 @@
...
@@ -15,7 +14,7 @@
#include <cstddef>
#include <cstddef>
#else
#else
#define __C
#define __C
#include <stddef>
#include <stddef
.h
>
#endif
#endif
typedef
enum
{
typedef
enum
{
...
@@ -45,6 +44,7 @@ typedef enum {
...
@@ -45,6 +44,7 @@ typedef enum {
INFINI_DEVICE_ILUVATAR
=
6
,
INFINI_DEVICE_ILUVATAR
=
6
,
INFINI_DEVICE_KUNLUN
=
7
,
INFINI_DEVICE_KUNLUN
=
7
,
INFINI_DEVICE_SUGON
=
8
,
INFINI_DEVICE_SUGON
=
8
,
INFINI_DEVICE_TYPE_COUNT
}
infiniDevice_t
;
}
infiniDevice_t
;
typedef
enum
{
typedef
enum
{
...
...
include/infinirt.h
View file @
4ee4c4f4
...
@@ -9,9 +9,10 @@ typedef void *infinirtEvent_t;
...
@@ -9,9 +9,10 @@ typedef void *infinirtEvent_t;
__C
__export
infiniStatus_t
infinirtInit
(
infiniDevice_t
device
);
__C
__export
infiniStatus_t
infinirtInit
(
infiniDevice_t
device
);
// Device
// Device
__C
__export
infiniStatus_t
infinirtGetAllDeviceCount
(
int
*
count_array
);
__C
__export
infiniStatus_t
infinirtGetDeviceCount
(
infiniDevice_t
device
,
int
*
count
);
__C
__export
infiniStatus_t
infinirtSetDevice
(
infiniDevice_t
device
,
int
device_id
);
__C
__export
infiniStatus_t
infinirtSetDevice
(
infiniDevice_t
device
,
int
device_id
);
__C
__export
infiniStatus_t
infinirtGetDevice
(
infiniDevice_t
*
device_ptr
,
int
*
device_id_ptr
);
__C
__export
infiniStatus_t
infinirtGetDevice
(
infiniDevice_t
*
device_ptr
,
int
*
device_id_ptr
);
__C
__export
infiniStatus_t
infinirtGetDeviceCount
(
infiniDevice_t
device
,
int
*
count
);
__C
__export
infiniStatus_t
infinirtDeviceSynchronize
();
__C
__export
infiniStatus_t
infinirtDeviceSynchronize
();
// Stream
// Stream
...
@@ -24,11 +25,11 @@ __C __export infiniStatus_t infinirtStreamWaitEvent(infinirtStream_t stream, inf
...
@@ -24,11 +25,11 @@ __C __export infiniStatus_t infinirtStreamWaitEvent(infinirtStream_t stream, inf
typedef
enum
{
typedef
enum
{
INFINIRT_EVENT_COMPLETE
=
0
,
INFINIRT_EVENT_COMPLETE
=
0
,
INFINIRT_EVENT_NOT_READY
=
1
,
INFINIRT_EVENT_NOT_READY
=
1
,
}
infinirtEventStatus
;
}
infinirtEventStatus
_t
;
__C
__export
infiniStatus_t
infinirtEventCreate
(
infinirtEvent_t
*
event_ptr
);
__C
__export
infiniStatus_t
infinirtEventCreate
(
infinirtEvent_t
*
event_ptr
);
__C
__export
infiniStatus_t
infinirtEventRecord
(
infinirtEvent_t
event
,
infinirtStream_t
stream
);
__C
__export
infiniStatus_t
infinirtEventRecord
(
infinirtEvent_t
event
,
infinirtStream_t
stream
);
__C
__export
infiniStatus_t
infinirtEventQuery
(
infinirtEvent_t
event
,
infinirtEventStatus
*
status_ptr
);
__C
__export
infiniStatus_t
infinirtEventQuery
(
infinirtEvent_t
event
,
infinirtEventStatus
_t
*
status_ptr
);
__C
__export
infiniStatus_t
infinirtEventSynchronize
(
infinirtEvent_t
event
);
__C
__export
infiniStatus_t
infinirtEventSynchronize
(
infinirtEvent_t
event
);
__C
__export
infiniStatus_t
infinirtEventDestroy
(
infinirtEvent_t
event
);
__C
__export
infiniStatus_t
infinirtEventDestroy
(
infinirtEvent_t
event
);
...
...
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