Fastest and Simpler Data Manipulation Library for C/C++
๐ Documentation โข ๐ Quick Start โข ๐ค Contributing
- High Performance: Optimized for speed with SIMD and multi-threading support
- Multi-Device Support: Full acceleration for CPU, CUDA, XPU, NPU, and TPU
- Simple API: Clean, intuitive C and C++ interfaces
- Comprehensive: All essential data manipulation operations
- Production Ready: Thoroughly tested, documented, and battle-tested
- Cross-Platform: Works on Windows, Linux, and macOS
- Zero Dependencies: Core library has no external dependencies
- Memory Efficient: Smart memory management with minimal overhead
- Modular Design: Well-organized codebase with clear separation of concerns
Download the latest release for your platform from GitHub Releases:
- Linux:
tablr-linux-x64.tar.gz - Windows:
tablr-windows-x64.zip - macOS:
tablr-macos-x64.tar.gz
Extract and copy to your system:
Linux/macOS:
tar -xzf tablr-linux-x64.tar.gz
sudo cp -r lib/* /usr/local/lib/
sudo cp -r include/* /usr/local/include/Windows:
Extract the zip file and add the lib and include directories to your project paths.
For xmake users, download tablr-xmake-{version}.tar.gz from releases:
tar -xzf tablr-xmake-0.1.0.tar.gz
cd tablr-xmake-0.1.0
xmake installOr add to your xmake.lua:
add_includedirs("/path/to/tablr/include")
add_linkdirs("/path/to/tablr/lib")
add_links("tablr")git clone https://github.com/muhammad-fiaz/tablr.git
cd tablr
xmake build
xmake install#include <tablr/tablr.h>
int main() {
/* Create dataframe */
TablrDataFrame* df = tablr_dataframe_create();
/* Create series */
int ages[] = {25, 30, 35, 40};
float salaries[] = {50000.0f, 60000.0f, 70000.0f, 80000.0f};
TablrSeries* age_series = tablr_series_create(ages, 4, TABLR_INT32, TABLR_CPU);
TablrSeries* salary_series = tablr_series_create(salaries, 4, TABLR_FLOAT32, TABLR_CPU);
/* Add columns */
tablr_dataframe_add_column(df, "Age", age_series);
tablr_dataframe_add_column(df, "Salary", salary_series);
/* Print dataframe */
tablr_dataframe_print(df);
/* Cleanup */
tablr_dataframe_free(df);
return 0;
}#include <tablr/tablr.hpp>
int main() {
/* Read CSV */
auto df = tablr::DataFrame::read_csv("data.csv");
/* Filter rows */
auto filtered = df.filter([](size_t row) {
return row > 0;
});
/* Sort by column */
auto sorted = df.sort("Age", true);
/* Print results */
sorted.print();
return 0;
}tablr_dataframe_create()- Create empty dataframetablr_read_csv()- Read from CSV filetablr_dataframe_copy()- Copy dataframe
tablr_series_create()- Create from arraytablr_series_zeros()- Create filled with zerostablr_series_ones()- Create filled with onestablr_series_arange()- Create with range of values
tablr_dataframe_head()- Get first n rowstablr_dataframe_tail()- Get last n rowstablr_dataframe_filter()- Filter by conditiontablr_dataframe_select_rows()- Select specific rowstablr_dataframe_select_columns()- Select specific columns
tablr_dataframe_sort()- Sort by columntablr_dataframe_groupby()- Group by columntablr_dataframe_merge()- Merge dataframestablr_dataframe_concat()- Concatenate dataframestablr_dataframe_dropna()- Drop missing values
tablr_dataframe_describe()- Descriptive statisticstablr_dataframe_aggregate()- Custom aggregation- Sum, Mean, Min, Max, Count, Std, Var
tablr_read_csv()- Read CSV filetablr_to_csv()- Write CSV filetablr_dataframe_print()- Print to console
Tablr supports multiple accelerator backends with full implementations:
/* CPU execution (default) */
TablrSeries* s1 = tablr_series_create(data, size, TABLR_FLOAT32, TABLR_CPU);
/* CUDA GPU - NVIDIA GPUs with CUDA kernels */
TablrSeries* s2 = tablr_series_create(data, size, TABLR_FLOAT32, TABLR_CUDA);
/* Intel XPU - Intel GPUs with SYCL/DPC++ */
TablrSeries* s3 = tablr_series_create(data, size, TABLR_FLOAT32, TABLR_XPU);
/* Neural Processing Unit - AI accelerators */
TablrSeries* s4 = tablr_series_create(data, size, TABLR_FLOAT32, TABLR_NPU);
/* Tensor Processing Unit - Google TPU and similar */
TablrSeries* s5 = tablr_series_create(data, size, TABLR_FLOAT32, TABLR_TPU);
/* Transfer between devices */
TablrSeries* s_gpu = tablr_series_to_device(s1, TABLR_CUDA);
/* Set default device (CPU by default) */
tablr_set_default_device(TABLR_CUDA);
/* Create with default device */
TablrSeries* s6 = tablr_series_create_default(data, size, TABLR_FLOAT32);
/* Get current default device */
TablrDevice device = tablr_get_default_device();# CUDA support (NVIDIA GPUs)
xmake f --cuda=y && xmake
# Intel XPU support (Intel GPUs)
xmake f --xpu=y && xmake
# NPU support (Neural accelerators)
xmake f --npu=y && xmake
# TPU support (Tensor accelerators)
xmake f --tpu=y && xmake
# Multiple accelerators
xmake f --cuda=y --xpu=y --npu=y --tpu=y && xmakeTablr is designed for maximum performance:
- SIMD Optimizations: Vectorized operations for CPU
- CUDA Acceleration: Real CUDA kernels for NVIDIA GPUs
- Intel XPU: SYCL/DPC++ support for Intel GPUs
- NPU Support: Neural processing unit acceleration
- TPU Support: Tensor processing unit acceleration
- Memory Efficiency: Minimal allocations and smart caching
- Multi-threading: Parallel execution for large datasets
- Device Switching: Change default device anytime at runtime
Run the test suite:
xmake build tests
xmake run testsAll tests must pass before release.
Full documentation is available at https://muhammad-fiaz.github.io/Tablr/
- Use appropriate data types for your use case
- Free dataframes and series when done to avoid memory leaks
- Check return values for NULL
- Use GPU for large-scale computations
- Profile your code for bottlenecks
- Don't mix data from different devices without transfer
- Don't modify series data directly
- Don't forget to synchronize after GPU operations
- Don't use debug builds in production
- Don't ignore compiler warnings
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Muhammad Fiaz
- GitHub: @muhammad-fiaz
- Email: [email protected]
Special thanks to all contributors and the open-source community.
- ๐ง Email: [email protected]
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
Found a bug? Please open an issue on GitHub.