from typing import Any

import torch

from .base import FusingFunction


class Hadamard(FusingFunction):
    """Hadamard product fusing function."""

    def __init__(self):
        super().__init__()

    def __call__(self, s: torch.Tensor, r: torch.Tensor, **kwargs: Any) -> torch.Tensor:
        return s * r
