Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/bitn/_compat.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
--- @diagnostic disable: duplicate-set-field
--- @module "bitn._compat"
--- Internal compatibility layer for bitwise operations.
--- Provides feature detection and optimized primitives for use by bit16/bit32/bit64.
--- @class bitn._compat
local _compat = {}

--------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/bitn/bit16.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
--- This module provides a complete, version-agnostic implementation of 16-bit
--- bitwise operations that works across Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT.
--- Uses native bit operations where available for optimal performance.
--- @class bitn.bit16
local bit16 = {}

local _compat = require("bitn._compat")
Expand Down
1 change: 1 addition & 0 deletions src/bitn/bit32.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
--- This module provides a complete, version-agnostic implementation of 32-bit
--- bitwise operations that works across Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT.
--- Uses native bit operations where available for optimal performance.
--- @class bitn.bit32
local bit32 = {}

local _compat = require("bitn._compat")
Expand Down
1 change: 1 addition & 0 deletions src/bitn/bit64.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
--- where high is the upper 32 bits and low is the lower 32 bits.
--- Works across Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT.
--- Uses native bit operations where available for optimal performance.
--- @class bitn.bit64
local bit64 = {}

local bit32 = require("bitn.bit32")
Expand Down
4 changes: 4 additions & 0 deletions src/bitn/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@
--- -- 16-bit operations
--- local shifted = bitn.bit16.lshift(1, 8) -- 256
---
--- @class bitn
local bitn = {
--- @type bitn.bit16 16-bit bitwise operations
bit16 = require("bitn.bit16"),
--- @type bitn.bit32 32-bit bitwise operations
bit32 = require("bitn.bit32"),
--- @type bitn.bit64 64-bit bitwise operations
bit64 = require("bitn.bit64"),
}

Expand Down
1 change: 1 addition & 0 deletions src/bitn/utils/benchmark.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
--- @module "bitn.utils.benchmark"
--- Common benchmarking utilities for performance testing
--- @class bitn.utils.benchmark
local benchmark = {}

--- Run a benchmarked operation with warmup and timing
Expand Down
2 changes: 2 additions & 0 deletions src/bitn/utils/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
--- @module "bitn.utils"
--- Utility modules for bitn
--- @class bitn.utils
local utils = {
--- @type bitn.utils.benchmark Benchmarking utilities
benchmark = require("bitn.utils.benchmark"),
}

Expand Down
Loading