Home / Class/ void Class — pytorch Architecture

void Class — pytorch Architecture

Architecture documentation for the void class in StaticSort.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/native/sparse/cuda/StaticSort.h lines 13–27

  template <class A>
  struct Swap {
    template <class T>
    CUTLASS_HOST_DEVICE void s(T& v0, T& v1) {
      // Explicitly code out the Min and Max to nudge the compiler
      // to generate branchless code.
      T t = v0 < v1 ? v0 : v1; // Min
      v1 = v0 < v1 ? v1 : v0; // Max
      v0 = t;
    }

    CUTLASS_HOST_DEVICE Swap(A& a, const int& i0, const int& i1) {
      s(a[i0], a[i1]);
    }
  };

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free