/** * cloog_block_alloc function: * This function allocates the memory space for a CloogBlock structure and * sets its fields with those given as input. Then it returns a pointer to the * allocated space. The two parameters nb_scaldims and scaldims are for internal * service, put to respectively 0 and NULL if you don't know what they are * useful for ! * - statement is the statement list of the block, * - scattering is the scattering function for the block (NULL if unsure !), * - nb_scaldims is the number of scalar dimensions (0 if unsure !), * - scaldims is the array with the scalar dimensions values (NULL if unsure !), * - depth is the original block depth (the number of outer loops). ** * - June 11th 2005: first version. * - June 30th 2005: addition of the nb_scaldims and scaldims parameters. * - November 21th 2005: use of cloog_block_malloc. */ CloogBlock *cloog_block_alloc(CloogStatement *statement, int nb_scaldims, cloog_int_t *scaldims, int depth) { CloogBlock * block ; /* Block allocation. */ block = cloog_block_malloc(statement->state); block->statement = statement ; block->nb_scaldims = nb_scaldims ; block->scaldims = scaldims ; block->depth = depth ; block->references = 1 ; return block ; }
/** * cloog_block_alloc function: * This function allocates the memory space for a CloogBlock structure and * sets its fields with those given as input. Then it returns a pointer to the * allocated space. The two parameters nb_scaldims and scaldims are for internal * service, put to respectively 0 and NULL if you don't know what they are * useful for ! * - statement is the statement list of the block, * - nb_scaldims is the number of scalar dimensions (0 if unsure !), * - scaldims is the array with the scalar dimensions values (NULL if unsure !), * - depth is the original block depth (the number of outer loops). ** * - June 11th 2005: first version. * - June 30th 2005: addition of the nb_scaldims and scaldims parameters. * - November 21th 2005: use of cloog_block_malloc. */ CloogBlock * cloog_block_alloc(CloogStatement * statement, int nb_scaldims, Value * scaldims, int depth) { CloogBlock * block ; /* Block allocation. */ block = cloog_block_malloc() ; cloog_block_set_stmt (block, statement); cloog_block_set_nb_scaldims (block, nb_scaldims); cloog_block_set_scaldims (block, scaldims); cloog_block_set_depth (block, depth); cloog_block_init_references (block); return block ; }