|
15 | 15 | #include "moore/erf_moore.h" |
16 | 16 | #endif |
17 | 17 |
|
18 | | -__C __export infiniStatus_t infiniopCreateErfDescriptor( |
| 18 | +__INFINI_C __export infiniStatus_t infiniopCreateErfDescriptor( |
19 | 19 | infiniopHandle_t handle, |
20 | 20 | infiniopErfDescriptor_t *desc_ptr, |
21 | 21 | infiniopTensorDescriptor_t y_desc, |
22 | 22 | infiniopTensorDescriptor_t x_desc) { |
23 | 23 |
|
24 | | -#define CREATE(CASE, NAMESPACE) \ |
25 | | - case CASE: \ |
26 | | - return op::erf::NAMESPACE::Descriptor::create( \ |
27 | | - handle, \ |
28 | | - reinterpret_cast<op::erf::NAMESPACE::Descriptor **>(desc_ptr), \ |
29 | | - y_desc, \ |
| 24 | +#define CREATE(CASE, NAMESPACE) \ |
| 25 | + case CASE: \ |
| 26 | + return op::erf::NAMESPACE::Descriptor::create( \ |
| 27 | + handle, \ |
| 28 | + reinterpret_cast<op::erf::NAMESPACE::Descriptor **>(desc_ptr), \ |
| 29 | + y_desc, \ |
30 | 30 | {x_desc}) |
31 | 31 |
|
32 | 32 | switch (handle->device) { |
@@ -54,10 +54,10 @@ __C __export infiniStatus_t infiniopCreateErfDescriptor( |
54 | 54 | #undef CREATE |
55 | 55 | } |
56 | 56 |
|
57 | | -__C __export infiniStatus_t infiniopGetErfWorkspaceSize(infiniopErfDescriptor_t desc, size_t *size) { |
| 57 | +__INFINI_C __export infiniStatus_t infiniopGetErfWorkspaceSize(infiniopErfDescriptor_t desc, size_t *size) { |
58 | 58 |
|
59 | | -#define GET(CASE, NAMESPACE) \ |
60 | | - case CASE: \ |
| 59 | +#define GET(CASE, NAMESPACE) \ |
| 60 | + case CASE: \ |
61 | 61 | *size = reinterpret_cast<op::erf::NAMESPACE::Descriptor *>(desc)->workspaceSize(); \ |
62 | 62 | return INFINI_STATUS_SUCCESS; |
63 | 63 |
|
@@ -85,17 +85,17 @@ __C __export infiniStatus_t infiniopGetErfWorkspaceSize(infiniopErfDescriptor_t |
85 | 85 | return INFINI_STATUS_DEVICE_TYPE_NOT_SUPPORTED; |
86 | 86 | } |
87 | 87 |
|
88 | | -__C __export infiniStatus_t infiniopErf( |
| 88 | +__INFINI_C __export infiniStatus_t infiniopErf( |
89 | 89 | infiniopErfDescriptor_t desc, |
90 | 90 | void *workspace, |
91 | 91 | size_t workspace_size, |
92 | 92 | void *y, |
93 | 93 | const void *x, |
94 | 94 | void *stream) { |
95 | 95 |
|
96 | | -#define CALCULATE(CASE, NAMESPACE) \ |
97 | | - case CASE: \ |
98 | | - return reinterpret_cast<const op::erf::NAMESPACE::Descriptor *>(desc) \ |
| 96 | +#define CALCULATE(CASE, NAMESPACE) \ |
| 97 | + case CASE: \ |
| 98 | + return reinterpret_cast<const op::erf::NAMESPACE::Descriptor *>(desc) \ |
99 | 99 | ->calculate(workspace, workspace_size, y, {x}, stream) |
100 | 100 |
|
101 | 101 | switch (desc->device_type) { |
@@ -123,11 +123,11 @@ __C __export infiniStatus_t infiniopErf( |
123 | 123 | #undef CALCULATE |
124 | 124 | } |
125 | 125 |
|
126 | | -__C __export infiniStatus_t |
| 126 | +__INFINI_C __export infiniStatus_t |
127 | 127 | infiniopDestroyErfDescriptor(infiniopErfDescriptor_t desc) { |
128 | 128 |
|
129 | | -#define DELETE(CASE, NAMESPACE) \ |
130 | | - case CASE: \ |
| 129 | +#define DELETE(CASE, NAMESPACE) \ |
| 130 | + case CASE: \ |
131 | 131 | delete reinterpret_cast<const op::erf::NAMESPACE::Descriptor *>(desc); \ |
132 | 132 | return INFINI_STATUS_SUCCESS; |
133 | 133 |
|
|
0 commit comments