示例#1
0
文件: block.c 项目: Red54/cloog-ppl
/**
 * cloog_block_list_alloc function:
 * This function allocates the memory space for a CloogBlockList structure and
 * sets its fields with those given as input. Then it returns a pointer to the
 * allocated space.
 * - block is the block element of the list node,
 **
 * - June     11th 2005: first version.
 * - November 21th 2005: use of cloog_block_list_malloc.
 */
CloogBlockList * cloog_block_list_alloc(CloogBlock * block)
{ CloogBlockList * blocklist ;
  
  /* Block list node allocation. */
  blocklist = cloog_block_list_malloc() ;

  cloog_block_list_set_block (blocklist, block);
  cloog_block_inc_references (cloog_block_list_block (blocklist)); /* The block has a new reference to it. */
  cloog_block_list_set_next (blocklist, NULL);
  
  return blocklist ;
}
示例#2
0
文件: block.c 项目: Ced/cloog
/**
 * cloog_block_list_alloc function:
 * This function allocates the memory space for a CloogBlockList structure and
 * sets its fields with those given as input. Then it returns a pointer to the
 * allocated space.
 * - block is the block element of the list node,
 **
 * - June     11th 2005: first version.
 * - November 21th 2005: use of cloog_block_list_malloc.
 */
CloogBlockList * cloog_block_list_alloc(CloogBlock * block)
{ CloogBlockList * blocklist ;
  
  /* Block list node allocation. */
  blocklist = cloog_block_list_malloc() ;

  blocklist->block = block ;
  blocklist->block->references ++ ; /* The block has a new reference to it. */
  blocklist->next = NULL ;
  
  return blocklist ;
}