Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

edgify / torch   python

Repository URL to install this package:

Version: 2.0.1+cpu 

/ include / ATen / native / cuda / ForeachMinMaxFunctors.cuh

#pragma once

#include <ATen/NumericUtils.h>

namespace at {
namespace native {

// std:: does not have clamp functors
template <typename T>
struct minimum {
    __device__ T operator()(const T& a, const T& b) const { return (_isnan(a) || a < b) ? a : b; }
};

template <typename T>
struct maximum {
    __device__ T operator()(const T& a, const T& b) const { return (_isnan(a) || a > b) ? a : b; }
};

}} // at::native