Q. If variable a is host variable and dev_a is a device (GPU) variable, to allocate memory to dev_a select correct statement: (Solved)

1. cudamalloc( &dev_a, sizeof( int ) )

2. malloc( &dev_a, sizeof( int ) )

3. cudamalloc( (void**) &dev_a, sizeof( int ) )

4. malloc( (void**) &dev_a, sizeof( int ) )

  • c. cudamalloc( (void**) &dev_a, sizeof( int ) )
Subscribe Now

Get All Updates & News