Hi ,
I have a problem in allocating memory in device function dynamically…
See the below code…
device void Device_Fun( args… )
{
// Here I want to allocate the LARGE amount memory dynamically
}
global void Kernal_Fun( args… )
{
// calling device function…
Device_Fun( args … )
}
main()
{
// Kernal call…
Kernal_Fun<<<16, 256 >>>( args… )
}
I already used
extern __shared__ char chArray[];
and used it inside the device function, but it is efficient/working for small amount of memory.
- So What is the optimum way to allocate dynamic memory in device function?
- What is the maximum memory we can allocate dynamically in device function?
Please help Me!
Thanks
Manjunath