You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of my code uses a function to populate an array that holds 5 floats. The array is loaded with information that changes per iteration. The max value in that array is found then stored in another array. Initially, I wanted to create the array within the device meaning a new array would hold the calculated values. When I tried to do this, I got the following two errors:
Reason: unsupported call through a literal pointer (call to ijl_alloc_array_1d)
Reason: unsupported dynamic function invocation
Instead I preallocated a JACC array that would be holding the five values and placed it as an argument in my parallel_for function. I set up a for loop to set all values to zero before any calculation was performed so that it may be cleared. The issue was that once I checked the data in that array, it was always from the first iteration. The array had kept the data from the previous calculation even though it was being cleared before the calculation was performed.
I believe by using the same preallocated array, there is some issue with clearing the data and updating.
Perhaps allowing the construction of an array within the device function would clear this issue.
The text was updated successfully, but these errors were encountered:
Part of my code uses a function to populate an array that holds 5 floats. The array is loaded with information that changes per iteration. The max value in that array is found then stored in another array. Initially, I wanted to create the array within the device meaning a new array would hold the calculated values. When I tried to do this, I got the following two errors:
Reason: unsupported call through a literal pointer (call to ijl_alloc_array_1d)
Reason: unsupported dynamic function invocation
Instead I preallocated a JACC array that would be holding the five values and placed it as an argument in my parallel_for function. I set up a for loop to set all values to zero before any calculation was performed so that it may be cleared. The issue was that once I checked the data in that array, it was always from the first iteration. The array had kept the data from the previous calculation even though it was being cleared before the calculation was performed.
I believe by using the same preallocated array, there is some issue with clearing the data and updating.
Perhaps allowing the construction of an array within the device function would clear this issue.
The text was updated successfully, but these errors were encountered: