Skip to content

Commit 01a1880

Browse files
authoredMay 1, 2025
Revert "[flang][cuda] Use a reference for asyncObject (#138010)" (#138082)
This reverts commit 9b0eaf7.
1 parent 5f3e5df commit 01a1880

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+168
-163
lines changed
 

‎flang-rt/include/flang-rt/runtime/allocator-registry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
namespace Fortran::runtime {
2121

22-
using AllocFct = void *(*)(std::size_t, std::int64_t *);
22+
using AllocFct = void *(*)(std::size_t, std::int64_t);
2323
using FreeFct = void (*)(void *);
2424

2525
typedef struct Allocator_t {
@@ -28,7 +28,7 @@ typedef struct Allocator_t {
2828
} Allocator_t;
2929

3030
static RT_API_ATTRS void *MallocWrapper(
31-
std::size_t size, [[maybe_unused]] std::int64_t *) {
31+
std::size_t size, [[maybe_unused]] std::int64_t) {
3232
return std::malloc(size);
3333
}
3434
#ifdef RT_DEVICE_COMPILATION

‎flang-rt/include/flang-rt/runtime/descriptor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
#include <cstdio>
3030
#include <cstring>
3131

32-
/// Value used for asyncObject when no specific stream is specified.
33-
static constexpr std::int64_t *kNoAsyncObject = nullptr;
32+
/// Value used for asyncId when no specific stream is specified.
33+
static constexpr std::int64_t kNoAsyncId = -1;
3434

3535
namespace Fortran::runtime {
3636

@@ -372,7 +372,7 @@ class Descriptor {
372372
// before calling. It (re)computes the byte strides after
373373
// allocation. Does not allocate automatic components or
374374
// perform default component initialization.
375-
RT_API_ATTRS int Allocate(std::int64_t *asyncObject);
375+
RT_API_ATTRS int Allocate(std::int64_t asyncId);
376376
RT_API_ATTRS void SetByteStrides();
377377

378378
// Deallocates storage; does not call FINAL subroutines or

0 commit comments

Comments
 (0)