Skip to content

Commit 4feec1d

Browse files
committed
Feature(runtime): Add constructors for typed int8/uint8/int16/uint16 arrays
1 parent 0e5f734 commit 4feec1d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

packages/runtime/array.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,19 @@
33
//
44

55
#include "array.h"
6+
7+
LIBRARY_EXPORT Array<int8_t>* Int8ArrayConstructor__constructor(double size) {
8+
return new Array<int8_t>(static_cast<int32_t>(size));
9+
}
10+
11+
LIBRARY_EXPORT Array<uint8_t>* Uint8ArrayConstructor__constructor(double size) {
12+
return new Array<uint8_t>(static_cast<int32_t>(size));
13+
}
14+
15+
LIBRARY_EXPORT Array<int16_t>* Int16ArrayConstructor__constructor(double size) {
16+
return new Array<int16_t>(static_cast<int32_t>(size));
17+
}
18+
19+
LIBRARY_EXPORT Array<uint16_t>* Uint16ArrayConstructor__constructor(double size) {
20+
return new Array<uint16_t>(static_cast<int32_t>(size));
21+
}

0 commit comments

Comments
 (0)