[LLVMdev] LLVMdev Digest, Vol 80, Issue 13

Peter Lawrence peterl95124 at sbcglobal.net
Mon Feb 14 14:29:50 PST 2011


Reid,
           although K&R's  "The C Programming Language" does not use  
the term vector,
note that Stroustrup's "The C++ Programming Language" does (way  
before STL was ever envisioned) !

Metcalf's "Effective Fortran-77" does  not use the term vector,   
except that it is frequently used as the "name"
for an array in array usage examples, but then in "Effective  
Fortran-90", when an array is used as an index
into an array it is referred to as a "vector-valued-subscript", not  
an "array-valued-subscript" !

Guy Steel's "Common Lisp"  quote: "one-dimensional arrays are called  
_vectors_ in Common Lisp...".

the equivalent and interchangable usage of "array" and "vector" goes  
back to the beginning of computing....


when multiple items are placed within a single word of computer  
memory or a single register, it is "packed"
data, regardless of whether that it is of uniform type and size  
(array/vector-like) or of different type
and size (struct/record-like).


best,
-Peter Lawrence.




On Feb 14, 2011, at 1:27 PM, Reid Kleckner wrote:

> On Mon, Feb 14, 2011 at 3:49 PM, Peter Lawrence
> <peterl95124 at sbcglobal.net> wrote:
>> Andrew,
>>                your response highlights a naming problem in LLVM,
>> which is that  "array" and "vector"
>> mean the same thing in normal computer language and compiler theory
>> usage, so it is
>> inconvenient and misleading within LLVM to give one a very specific
>> meaning that is different
>> from the other....
>
> The only place in CS I know of that "vector" is used to mean
> arbitrarily long sequence of elements is the C++ STL vector template
> class.  So far as I know in the field of compilers "vectorization"
> always refers to lowering code down to use SIMD operations.
>
>> to the LLVM developers I would suggest using the term "packed" to
>> refer to the type of
>> data that the SPARC-VIS, the PPC-Altivec, and the Intel-mmx/sse
>> (among others) instruction
>> sets support.
>
> "packed" is already used to refer to "packed structs", ie structs
> without any padding.
>
> Reid




More information about the llvm-dev mailing list