[sac-user] 64 bit integer in SaC

Clemens Grelck c.grelck at uva.nl
Fri Aug 13 11:03:52 CEST 2010


Dear Salem,

You can easily activate array support for the built-in types you need.
Go to stdlib/modules/structures/Templates.mac

Here you can quckly see that if your name is Santanu you have support
for all built-in types, otherwise only for the common ones. Simply
add the types you really need to the list in the CPP else case:

#define BUILT_IN( fun)    \
fun( int)                 \
fun( float)               \
fun( double)              \
fun( bool)                \
fun( char)


#define NUM( fun)         \
fun( int)                 \
fun( float)               \
fun( double)

The only reason why we have limited support for all built-in types is that
stdlib compilation times are kind of linear in the number of types, which
can be annoying. We are currently working on a more elaborate solution.

  Clemens

Salem Reyen wrote:
> I managed to figure out that SaC does support long type for integer 
> scalar but not for the Array operations (eg, genarray) defined in the 
> standard library.
> 
> Salem
> 
> --- On *Fri, 8/13/10, Salem Reyen /<salemreyen at yahoo.com>/* wrote:
> 
> 
>     From: Salem Reyen <salemreyen at yahoo.com>
>     Subject: [sac-user] 64 bit integer in SaC
>     To: "sac user mailing list" <sac-user at sac-home.org>
>     Date: Friday, August 13, 2010, 2:34 AM
> 
>     Can anyone help me on how to pass 64 bit integer from SaC to C?  The
>     BLAS routines support 64 bit integer (as array index) but I could
>     out figure it out a way to do it.   Any help will be greatly
>     appreciated.  Thanks.
> 
>     Best regards,
> 
>     Salem
> 
> 
> 
>     -----Inline Attachment Follows-----
> 
>     _______________________________________________
>     sac-user mailing list
>     sac-user at sac-home.org </mc/compose?to=sac-user at sac-home.org>
>     http://lists.sac-home.org/mailman/listinfo.cgi/sac-user
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> sac-user mailing list
> sac-user at sac-home.org
> http://lists.sac-home.org/mailman/listinfo.cgi/sac-user

-- 
----------------------------------------------------------------------
Dr Clemens Grelck                                     Science Park 107
Universitair Docent                                  1098 XG Amsterdam
                                                              Nederland
Universiteit van Amsterdam
Instituut voor Informatica                       T +31 (0) 20 525 7578
                                                  F +31 (0) 20 525 7419
Office F2.46                                www.science.uva.nl/~grelck
----------------------------------------------------------------------



More information about the sac-user mailing list