Package edu.wpi.grip.core.sockets
Class CudaSocket
- java.lang.Object
-
- edu.wpi.grip.core.sockets.SocketImpl<T>
-
- edu.wpi.grip.core.sockets.InputSocketImpl<java.lang.Boolean>
-
- edu.wpi.grip.core.sockets.CudaSocket
-
- All Implemented Interfaces:
InputSocket<java.lang.Boolean>,Socket<java.lang.Boolean>
public class CudaSocket extends InputSocketImpl<java.lang.Boolean>
A type of input socket that lets an operation know that it should prefer to use a CUDA-accelerated code path. If no compatible CUDA runtime is available, sockets of this type will always have a value offalseand cannot be changed.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.wpi.grip.core.sockets.InputSocketImpl
InputSocketImpl.FactoryImpl
-
Nested classes/interfaces inherited from interface edu.wpi.grip.core.sockets.InputSocket
InputSocket.Decorator<T>, InputSocket.Factory
-
Nested classes/interfaces inherited from interface edu.wpi.grip.core.sockets.Socket
Socket.Direction
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.Boolean>getValue()booleanisCudaAvailable()voidsetValue(java.lang.Boolean value)Set the value of the socket, and fire off aSocketChangedEvent.voidsetValueOptional(java.util.Optional<? extends java.lang.Boolean> optionalValue)Set the value of the socket using anOptional, and fire off aSocketChangedEvent.-
Methods inherited from class edu.wpi.grip.core.sockets.InputSocketImpl
dirtied, onValueChanged, removeConnection
-
Methods inherited from class edu.wpi.grip.core.sockets.SocketImpl
addConnection, flagChanged, getConnections, getDirection, getSocketHint, getSource, getStep, setSource, setStep, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface edu.wpi.grip.core.sockets.Socket
addConnection, flagChanged, getConnections, getDirection, getSocketHint, getSource, getStep, setSource, setStep, simpleString
-
-
-
-
Method Detail
-
getValue
public java.util.Optional<java.lang.Boolean> getValue()
- Specified by:
getValuein interfaceSocket<java.lang.Boolean>- Overrides:
getValuein classSocketImpl<java.lang.Boolean>- Returns:
- The value currently stored in this socket.
-
setValue
public void setValue(@Nullable java.lang.Boolean value)Description copied from interface:SocketSet the value of the socket, and fire off aSocketChangedEvent.- Parameters:
value- The value to store in this socket. Nullable.
-
setValueOptional
public void setValueOptional(java.util.Optional<? extends java.lang.Boolean> optionalValue)
Description copied from interface:SocketSet the value of the socket using anOptional, and fire off aSocketChangedEvent.- Specified by:
setValueOptionalin interfaceSocket<java.lang.Boolean>- Overrides:
setValueOptionalin classSocketImpl<java.lang.Boolean>- Parameters:
optionalValue- The optional value to assign this socket to.
-
isCudaAvailable
public boolean isCudaAvailable()
-
-