Interlocked increment memory allocation and access
    1.
    发明授权
    Interlocked increment memory allocation and access 有权
    联锁增量内存分配和访问

    公开(公告)号:US09529632B2

    公开(公告)日:2016-12-27

    申请号:US12553652

    申请日:2009-09-03

    CPC分类号: G06F9/5016

    摘要: A method of allocating a memory to a plurality of concurrent threads is presented. The method includes dynamically determining writer threads each having at least one pending write to the memory; and dynamically allocating respective contiguous blocks in the memory for each of the writer threads. Another method of allocating a memory to a plurality of concurrent threads includes launching the plurality of threads as a plurality of wavefronts, dynamically determining a group of wavefronts each having at least one thread requiring a write to the memory, and dynamically allocating respective contiguous blocks in the memory for each wavefront from the group of wavefronts. A corresponding method of assigning a memory to a plurality of reader threads includes determining a first number corresponding to a number of writer threads having a block allocated in said memory, launching a first number of reader threads, entering a first wavefront of said reader threads from said group of wavefronts to an atomic operation, and assigning a first block in the memory to the first wavefront during the corresponding atomic operation, where the first block is contiguous to a previously allocated block dynamically allocated to another wavefront from said group of wavefronts. Corresponding system embodiments and computer program product embodiments are also presented.

    摘要翻译: 提出了一种向多个并发线程分配存储器的方法。 该方法包括动态地确定写入器线程,每个写入器线程具有至少一个待写入到存储器的 并为每个写入器线程动态地分配存储器中的相应连续块。 向多个并发线程分配存储器的另一种方法包括:将多个线程作为多个波前发射,动态地确定每组具有至少一个需要对存储器进行写入的线程的波前组,以及动态分配相应的连续块 从波浪组的每个波前的记忆。 将存储器分配给多个读取器线程的相应方法包括确定与具有在所述存储器中分配的块的写入器线程数相对应的第一数字,启动第一数量的读取器线程,从所述读取器线程的第一波前输入 所述波束组合到原子操作,并且在相应的原子操作期间将第一块在存储器中分配给第一波阵面,其中第一块与先前分配的块相邻,所述块先前从所述波阵组中分配给另一波阵面。 还提出了相应的系统实施例和计算机程序产品实施例。