#NEWLINE# def alloc_host( num_bytes ) : #NEWLINE# #INDENT# '\n    Allocate a buffer on the host with specified number of bytes.\n    ' #NEWLINE# ptr = ct . c_void_p ( 0 ) #NEWLINE# c_num_bytes = c_dim_t ( num_bytes ) #NEWLINE# safe_call ( backend . get ( ) . af_alloc_host ( ct . pointer ( ptr ) , c_num_bytes ) ) #NEWLINE# return ptr . value