Files
SNPLIB/GEMINI.md

2.3 KiB

Project: SNPLIB

1. Overview

This project (SNPLIB) is a high-performance computing library for Quantitative Genetics developed in C++. The core objective of the project is to leverage modern C++ features and achieve extreme numerical computation performance through optimized math libraries (such as Intel MKL or OpenBLAS).

This project uses CMake for cross-platform build management and strictly adheres to the Google C++ Coding Style.

2. Core Tech Stack & Standards

2.1 Programming Language

  • C++: The project will use C++ (C++17 or higher recommended) as the primary development language.

2.2 Build System

  • CMake: This project uses CMake (version 3.15 or higher recommended) as the sole cross-platform build system.
  • CMakeLists.txt files are responsible for managing all compilation targets, dependency linking, and platform-specific configurations.

2.3 Performance & Dependencies

  • BLAS/LAPACK Acceleration: To achieve high-performance matrix and vector operations, this project relies on the BLAS and LAPACK interfaces.
  • Supported Libraries:
    • Intel MKL (Math Kernel Library): The preferred high-performance library, especially on Intel architectures.
    • OpenBLAS: A high-performance open-source alternative for BLAS/LAPACK with excellent cross-platform compatibility.
  • The CMake configuration will provide options (e.g., USE_MKL=ON or USE_OPENBLAS=ON) to allow users to select the math library to link against at compile time.

2.4 Coding Style

  • Google C++ Coding Style: This project strictly adheres to the Google C++ Style Guide.
  • Formatting: All C++ code submitted must be formatted using clang-format (based on the Google style).
  • Linting: Using clang-tidy is recommended to ensure code quality and style consistency.

3. Environment Setup

Before starting the build, you must ensure the following dependencies are installed on your system:

  1. C++ Compiler (e.g., GCC, Clang, MSVC)
  2. CMake (version >= 3.15)
  3. Intel MKL or OpenBLAS
    • For Intel MKL, ensure the MKLROOT environment variable is set, or point to its installation path via the CMake CMAKE_PREFIX_PATH.
    • For OpenBLAS, ensure CMake can find it via find_package(OpenBLAS).