Skip to content

Commit

Permalink
Compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffxy committed Sep 11, 2024
1 parent 1ac4735 commit 1f9b1da
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 19 deletions.
13 changes: 10 additions & 3 deletions sandbox/qe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
name = "brad_qe"
version = "0.1.0"
edition = "2021"
build = "build.rs"
# NOTE: This currently does not work. (C++ standard library linking error)
# build = "build.rs"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -24,5 +25,11 @@ cc = "1.0.96"
[[bin]]
name = "bench_q3"
path = "src/bin/bench_q3.rs"
name = "test_radixspline"
path = "src/bin/test_radixspline.rs"

[[bin]]
name = "brad_qe_repl"
path = "src/bin/repl.rs"

# [[bin]]
# name = "test_radixspline"
# path = "src/bin/test_radixspline.rs"
2 changes: 1 addition & 1 deletion sandbox/qe/RadixSplineLib/radixspline.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "radixspline.hpp"
#include "radixspline.h"

void* build(const uint64_t* ks, uint64_t size) {
RSData* rs = new RSData;
Expand Down
4 changes: 3 additions & 1 deletion sandbox/qe/build.rs → sandbox/qe/build_bindings.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::env;
use std::path::PathBuf;

// NOTE: This file should be named `build.rs` once it is working.

fn main() {
// This is the directory where the `c` library is located.
let libdir_path = PathBuf::from("RadixSplineLib")
Expand Down Expand Up @@ -56,7 +58,7 @@ fn main() {
// automatically know it must look for a `libradixspline.a` file.
println!("cargo:rustc-link-lib=radixspline");
println!("cargo:rustc-link-lib=stdc++");

// The bindgen::Builder is the main entry point
// to bindgen, and lets you build up options for
// the resulting bindings.
Expand Down
12 changes: 0 additions & 12 deletions sandbox/qe/src/bin/test_radixspline.rs

This file was deleted.

3 changes: 2 additions & 1 deletion sandbox/qe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ pub mod ops;
/// Utilities for rewriting DataFusion `ExecutionPlan`s.
pub mod rewrite;

pub mod radixspline;
// RadixSpline bindings. Currently not working.
// pub mod radixspline;

/// Represents an "open" IOHTAP database. Eventually, the DB should run as a
/// daemon process. For now it is just an embedded DB (similar to SQLite).
Expand Down
2 changes: 1 addition & 1 deletion sandbox/qe/src/radixspline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl RadixSpline {
pub fn build(record_batch: &RecordBatch, column_index: usize) -> RadixSpline {
let column = record_batch.column(column_index);
let u64_array = column.as_any().downcast_ref::<UInt64Array>().unwrap();

let ptr = u64_array.values().as_ptr();
let size = column.len() as u64;
unsafe {
Expand Down

0 comments on commit 1f9b1da

Please sign in to comment.