「abs」の版間の差分

提供: Tommy6
移動: 案内検索
(ページの作成: {{Pathnav|OpenCL|OpenCLマニュアル|OpenCL C 言語|組み込み関数|整数関数}} {{gentype integer-function}} {{関数| ugentype abs (gentype ''x'') }} {{翻訳| ...)
 
 
22行: 22行:
 
[[Category:OpenCL C 言語]]
 
[[Category:OpenCL C 言語]]
 
[[Category:組み込み関数]]
 
[[Category:組み込み関数]]
[[Category:数学関数]]
+
[[Category:整数関数]]

2011年5月13日 (金) 21:26時点における最新版

他に指定されている場合を除き、型名 gentype を、組み込みデータ型 char, char{2|3|4|8|16}, uchar, uchar{2|3|4|8|16}, short, short{2|3|4|8|16}, ushort, ushort{2|3|4|8|16}, int, int{2|3|4|8|16}, uint, uint{2|3|4|8|16}, long, long{2|3|4|8|16}, ulong, ulong{2|3|4|8|16} を指すものとして用います。また、型名 ugentype を型名 gentype の符号無し版を指すものとして用います。たとえば、gentype が char4 のとき、ugentype は uchar4 です。型名 sgentype を、組み込みスカラデータ型 char, uchar, short, ushort, int, uint, long, ulong を指すものとして用います。整数関数が gentype と sgentype をとるとき、gentype は sgentype のスカラもしくはベクトル版になります。たとえば、sgentype が uchar のとき、gentype は uchar もしくは uchar{2|3|4|8|18} になります。

他に指定されている場合を除き、関数を使用する際の引数および戻り値の型は全て同じです。

ugentype abs (gentype x)

絶対値を求めます。

変更記録

脚注



―――― Version 1.1, The OpenCL Specification より翻訳