'\" t .\" Title: vec_step .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/14/2021 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "VEC_STEP" "3clc" "01/14/2021" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" vec_step \- Takes a built\-in scalar or vector data type argument and returns an integer value representing the number of elements in the scalar or vector\&. .SH "" .HP \w'int\ vec_step('u .BI "int vec_step(gentype\fIn\fR\ " "a" ");" .HP \w'int\ vec_step('u .BI "int vec_step(char3\ " "a" ");" .HP \w'int\ vec_step('u .BI "int vec_step(uchar3\ " "a" ");" .HP \w'int\ vec_step('u .BI "int vec_step(short3\ " "a" ");" .HP \w'int\ vec_step('u .BI "int vec_step(ushort3\ " "a" ");" .HP \w'int\ vec_step('u .BI "int vec_step(half3\ " "a" ");" .HP \w'int\ vec_step('u .BI "int vec_step(int3\ " "a" ");" .HP \w'int\ vec_step('u .BI "int vec_step(uint3\ " "a" ");" .HP \w'int\ vec_step('u .BI "int vec_step(long3\ " "a" ");" .HP \w'int\ vec_step('u .BI "int vec_step(ulong3\ " "a" ");" .HP \w'int\ vec_step('u .BI "int vec_step(float3\ " "a" ");" .HP \w'int\ vec_step('u .BI "int vec_step(double3\ " "a" ");" .HP \w'int\ vec_step('u .BI "int vec_step(" "type" ");" .SH "DESCRIPTION" .PP The \fBvec_step\fR built\-in function takes a built\-in scalar or vector data type argument and returns an integer value representing the number of elements in the scalar or vector\&. .PP For all scalar types, \fBvec_step\fR returns 1\&. .PP The \fBvec_step\fR built\-in functions that take a 3\-component vector return 4\&. .PP \fBvec_step\fR may also take a pure type as an argument, e\&.g\&. \fBvec_step\fR(\fBfloat2\fR) .PP We use the generic type name \fBgentype\fR\fB\fIn\fR\fR (or \fBgentype\fR\fB\fIm\fR\fR) to indicate the built\-in data types \fBchar{2|4|8|16}\fR, \fBuchar{2|4|8|16}\fR, \fBshort{2|4|8|16}\fR, \fBushort{2|4|8|16}\fR, \fBint{2|4|8|16}\fR, \fBuint{2|4|8|16}\fR, \fBlong{2|4|8|16}\fR, \fBulong{2|4|8|16}\fR, or \fBfloat{2|4|8|16}\fR as the type for the arguments unless otherwise stated\&. We use the generic name \fBugentype\fR\fB\fIn\fR\fR to indicate the built\-in unsigned integer data types\&. If the \fBdouble\fR is supported, then \fBgentype\fR\fB\fIn\fR\fR (or \fBgentype\fR\fB\fIm\fR\fR) also indicate the built\-in data types \fBdouble{2|4|8|16}\fR\&. .PP The generic type name \fBgentype\fR\fB\fIn\fR\fR (or \fBgentype\fR\fB\fIm\fR\fR) may indicate the data type \fBhalf{2|4|8|16}\fR if the \fBcl_khr_fp16\fR(3clc) extension is supported\&. .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBmiscVectorFunctions\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 282, section 6.12.12 Miscellaneous Vector Functions .RE