Skip to content

Commit 3b9755f

Browse files
committed
port apache arrow attempts to new memory strategy; getting close!!
1 parent e4a406f commit 3b9755f

File tree

7 files changed

+1126
-1203
lines changed

7 files changed

+1126
-1203
lines changed

Telemetry-SD-Card/CMakeLists.txt

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,27 @@ include(mbed_project_setup)
1313
# Include MBED OS
1414
add_subdirectory(../mbed-os ../mbed-os-build)
1515

16-
# # Fetch Nanoarrow - a minimal implementation of Apache Arrow
17-
# include(FetchContent)
18-
# # This enables the nanoarrow IPC extension (required to use Arrow IPC functions)
19-
# # (note: the nanoarrow_ipc library is created conditionally based on this flag)
20-
# set(NANOARROW_IPC ON CACHE BOOL "Build IPC extension")
21-
# FetchContent_Declare(
22-
# nanoarrow
23-
# URL https://github.com/apache/arrow-nanoarrow/releases/download/apache-arrow-nanoarrow-0.6.0/apache-arrow-nanoarrow-0.6.0.tar.gz
24-
# URL_HASH SHA512=25e81c119c16bfa29a9943d3904acd8f29f225ff4a1c99decde7c8235300232402106a4b5249921df773fb797bb0149a885fa3a4524c34c67c06199edd72250c
25-
# DOWNLOAD_EXTRACT_TIMESTAMP ON
26-
# )
27-
# FetchContent_MakeAvailable(nanoarrow)
16+
# Fetch Nanoarrow - a minimal implementation of Apache Arrow
17+
include(FetchContent)
18+
# This enables the nanoarrow IPC extension (required to use Arrow IPC functions)
19+
# (note: the nanoarrow_ipc library is created conditionally based on this flag)
20+
set(NANOARROW_IPC ON CACHE BOOL "Build IPC extension")
21+
FetchContent_Declare(
22+
nanoarrow
23+
URL https://github.com/apache/arrow-nanoarrow/releases/download/apache-arrow-nanoarrow-0.6.0/apache-arrow-nanoarrow-0.6.0.tar.gz
24+
URL_HASH SHA512=25e81c119c16bfa29a9943d3904acd8f29f225ff4a1c99decde7c8235300232402106a4b5249921df773fb797bb0149a885fa3a4524c34c67c06199edd72250c
25+
DOWNLOAD_EXTRACT_TIMESTAMP ON
26+
)
27+
FetchContent_MakeAvailable(nanoarrow)
2828

2929

3030
# Add our main executable, and link all the above libraries to it
3131
set(CMAKE_CXX_STANDARD 20)
3232
add_executable(${PROJECT_NAME} main.cpp)
3333

3434
target_include_directories(${PROJECT_NAME} PUBLIC include)
35-
# target_link_libraries(${PROJECT_NAME} mbed-os FATFileSystem SDFileSystem nanoarrow nanoarrow_ipc)
36-
# target_link_libraries(${PROJECT_NAME} mbed-baremetal FATFileSystem SDFileSystem)
37-
# target_link_libraries(${PROJECT_NAME} mbed-os FATFileSystem SDFileSystem)
38-
39-
target_link_libraries(${PROJECT_NAME} mbed-os mbed-storage-sd mbed-storage-fat)
35+
target_link_libraries(${PROJECT_NAME} mbed-os mbed-storage-sd mbed-storage-fat nanoarrow nanoarrow_ipc)
36+
# target_link_libraries(${PROJECT_NAME} mbed-baremetal mbed-storage-sd mbed-storage-fat)
37+
# target_link_libraries(${PROJECT_NAME} mbed-baremetal mbed-storage-sd mbed-storage-fat nanoarrow nanoarrow_ipc)
4038

4139
mbed_set_post_build(${PROJECT_NAME})

Telemetry-SD-Card/dbc_to_cpp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def choose_float_type(s: cantools.db.Signal, tolerance: float):
9393
return pa.float64()
9494

9595

96-
def generate_nanoarrow_code(signal_to_fsdaq_datatype: dict[str, str], rows: int = 8):
96+
def generate_cpp_code(signal_to_fsdaq_datatype: dict[str, str], rows: int = 8):
9797
assert rows % 8 == 0
9898

9999
out_file = open("./fsdaq_encoder_generated_from_dbc.hpp", "w")
@@ -146,7 +146,7 @@ def generate_nanoarrow_code(signal_to_fsdaq_datatype: dict[str, str], rows: int
146146

147147
# n = 50
148148
# generate_nanoarrow_code({k: signal_to_datatype[k] for k in list(signal_to_datatype)[:n]}, 8)
149-
generate_nanoarrow_code({k: signal_to_datatype[k] for k in list(signal_to_datatype)}, 80)
149+
generate_cpp_code({k: signal_to_datatype[k] for k in list(signal_to_datatype)}, 80)
150150

151151

152152

0 commit comments

Comments
 (0)