// File: rms_norm.h
#pragma once
#include <cstdint>

// Per-definition constants for this rms_norm fp32 specialisation.
// out[m] = x[m] / sqrt(mean(x[m]^2) + eps) * weight
// x/weight are plain fp32; output accumulates/returns in fp32.
namespace rms_norm_def {
constexpr int   D   = 2048;
constexpr float Eps = 1e-6f;   // matches the Definition's reference implementation
} // namespace rms_norm_def

#ifdef __cplusplus
extern "C" {
#endif
// LLM target: implement this in kernel.cpp.
// M is the only var dim. x: (M, D) fp32; weight: (D) fp32; output: (M, D) float32.
void inner_rms_norm(const float* x, float* output, const float* weight, int M);
#ifdef __cplusplus
}
#endif