Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

@rewrite for arbitrary operation/function

オープン
#253 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
julia
領域
tooling

調査の方向性

まず @rewrite マクロを追跡し、標準的な算術演算の処理を、提供されている sin メソッドの処理と比較します。互換性のケースとして promote_operation、operate!、operate_to! の例を使用します。任意の関数(sin など)を、既存の算術動作を失うことなく mutable 型向けに書き換えられれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Does MutableArithmetics not work for general functions, only for the standard arithmetic operations (+,-,/,*)? I have a mutable type that overrides many of the Base functions (sin, cos, abs, sqrt, csc) as well as some others not in base (sinhc). I'd really like to use this interface and the @rewrite macro to speed up evaluation of expressions, but I've found it doesn't work for these functions.

My code for sin for example is

mutability(::Type{TPS}) = IsMutable()

function promote_operation(::typeof(sin), ::Type{TPS}, ::Type{TPS}) 
  return TPS
end

function operate!(::typeof(sin), a::TPS)
  mad_tpsa_sin!(a.tpsa, a.tpsa)
  return a
end

function operate_to!(output::TPS, ::typeof(sin), a::TPS)
  mad_tpsa_sin!(a.tpsa, output.tpsa)
  return output
end
主要言語
TeX
スター
55
フォーク
15
平均マージ
19時間 44分
マージ済み PR(30日)
9

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jump-dev/MutableArithmetics.jl のほかの issue

jump-dev/MutableArithmetics.jl の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。