Leon Sit
2010-Dec-15 17:08 UTC
[LLVMdev] example of language with vector as first class type
When you say vector in GCC, do you mean vector in the mathematical sense or the low level array sense? Leon On Wed, Dec 15, 2010 at 11:06 AM, John McCall <rjmccall at apple.com> wrote:> On Dec 15, 2010, at 8:37 AM, Leon Sit wrote: > > Does anyone know any example compiler where it has vector/matrix as first > class type like matlab using llvm? If not, does anyone have idea how that > should be done on llvm? > > Any GCC-compatible frontend — i.e. llvm-gcc, clang, or dragonegg — has > vectors as a first-class type. I wouldn't exactly laud any of GCC's various > vector extensions as a sterling example of good language design, but if > you're just looking for demonstrations of how to generate vector IR, that's > where I'd start. > > John.-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101215/00fbb194/attachment.html>
John McCall
2010-Dec-15 17:18 UTC
[LLVMdev] example of language with vector as first class type
On Dec 15, 2010, at 9:08 AM, Leon Sit wrote:> When you say vector in GCC, do you mean vector in the mathematical sense or the low level array sense?In the approximately mathematical sense of "the sort of object manipulated by a processor with vector extensions", i.e. a generally small, fixed-size tuple of integer or floating-point element type. I don't mean the C++ resizable-array type. John.
Leon Sit
2010-Dec-15 18:10 UTC
[LLVMdev] example of language with vector as first class type
To state my objective again because I was unclear about it. I want to write a interpretor/compiler that can handles mathematical vector/matrix with linear algebra operation on llvm. Something like matlab/R. I am thinking at a higher level like performing type, and shape inference on matrix/vector type, unrolling the inner loop of matrix operation of full algebraic expression instead of computing the terms eagerly. Do people think llvm is suitable for this context? Thanks. On Wed, Dec 15, 2010 at 11:18 AM, John McCall <rjmccall at apple.com> wrote:> On Dec 15, 2010, at 9:08 AM, Leon Sit wrote: > > When you say vector in GCC, do you mean vector in the mathematical sense > or the low level array sense? > > In the approximately mathematical sense of "the sort of object manipulated > by a processor with vector extensions", i.e. a generally small, fixed-size > tuple of integer or floating-point element type. I don't mean the C++ > resizable-array type. > > John.-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101215/b57c6d06/attachment.html>
Apparently Analagous Threads
- [LLVMdev] example of language with vector as first class type
- [LLVMdev] example of language with vector as first class type
- [LLVMdev] example of language with vector as first class type
- [LLVMdev] example of language with vector as first class type
- [LLVMdev] Proposal for TableML, llvmc2 configuration language