Skip to main content

Mojo struct

SMemArray

struct SMemArray[type: AnyType, size: Int]

Helper struct for allocating shared memory arrays.

Parameters

  • type (AnyType): The type of elements in the array.
  • size (Int): The number of elements in the array.

Implemented traits

AnyType, UnknownDestructibility

Aliases

__del__is_trivial

alias __del__is_trivial = True

storage_size

alias storage_size = (size * size_of[type]())

T

alias T = UnsafePointer[type, address_space=AddressSpace(3)]

Methods

build

static build(mut smem_mgr: NVIDIASharedMemoryManager[name, alignment, memory_alignment]) -> UnsafePointer[type, address_space=AddressSpace(3)]

Build a shared memory array using the memory manager.

Args:

Returns:

UnsafePointer: Pointer to the allocated shared memory array.

Was this page helpful?