Extended Description
Created an attachment (id=899)
Full console output
A toy sample program I used to study the CUDA backend transformations does not compile with the flag -doexpar, sorry for not reporting this earlier. The compiler exists with the following message:
$ sac2c -target MBpro_cuda mt_cuda.sac -doexpar -dopfd
...
** 20: Preparing C code generation ...
**** CUDA Prepare kernel generation ...
**** Marking memval identifiers ...
**** CUDA Adjust return ids of single threaded kernel ...
cuda/adjust_stknl_rets.c:486 Assertion "!TUisScalar( AVIS_TYPE( ID_AVIS( ret_id)))" failed!
Scalar found in N_return!
The code for mt_cuda.sac:
inline
int add( int a, int b) {
return( _add_SxS_( a, b));
}
int main( )
{
x = 1;
foo = with {
([1,1] <= iv=[i,j] < [40960,4096]) {
res = 20;
}:res;
}:genarray([40960, 20000], 0);
y = add(x,_sel_VxA_([1,20],foo));
foo = with {
([0,10] <= iv=[i,j] < [40960,4000]) {
res = 0;
}:res;
}:modarray(foo);
z= add(y,_sel_VxA_([1,2],foo));
w = with {([0,0] <= iv < [40960,20000]): _sel_VxA_(iv,foo);}: fold( add, 0);
return( add(z,w));
}
I'm attaching the full console output of sac2c too. I'm using latest version from svn (rev. 17876).