public class SDBitwise extends SDOps
Modifier and Type | Method and Description |
---|---|
SDVariable |
and(SDVariable x,
SDVariable y)
Bitwise AND operation.
|
SDVariable |
and(String name,
SDVariable x,
SDVariable y)
Bitwise AND operation.
|
SDVariable |
bitRotl(SDVariable x,
SDVariable shift)
Roll integer bits to the left, i.e.
|
SDVariable |
bitRotl(String name,
SDVariable x,
SDVariable shift)
Roll integer bits to the left, i.e.
|
SDVariable |
bitRotr(SDVariable x,
SDVariable shift)
Roll integer bits to the right, i.e.
|
SDVariable |
bitRotr(String name,
SDVariable x,
SDVariable shift)
Roll integer bits to the right, i.e.
|
SDVariable |
bitsHammingDistance(SDVariable x,
SDVariable y)
Bitwise Hamming distance reduction over all elements of both input arrays.
For example, if x=01100000 and y=1010000 then the bitwise Hamming distance is 2 (due to differences at positions 0 and 1) Inputs must satisfy the following constraints: Must be same types: isSameType(x, y) |
SDVariable |
bitsHammingDistance(String name,
SDVariable x,
SDVariable y)
Bitwise Hamming distance reduction over all elements of both input arrays.
For example, if x=01100000 and y=1010000 then the bitwise Hamming distance is 2 (due to differences at positions 0 and 1) Inputs must satisfy the following constraints: Must be same types: isSameType(x, y) |
SDVariable |
bitShift(SDVariable x,
SDVariable shift)
Shift integer bits to the left, i.e.
|
SDVariable |
bitShift(String name,
SDVariable x,
SDVariable shift)
Shift integer bits to the left, i.e.
|
SDVariable |
bitShiftRight(SDVariable x,
SDVariable shift)
Shift integer bits to the right, i.e.
|
SDVariable |
bitShiftRight(String name,
SDVariable x,
SDVariable shift)
Shift integer bits to the right, i.e.
|
SDVariable |
leftShift(SDVariable x,
SDVariable y)
Bitwise left shift operation.
|
SDVariable |
leftShift(String name,
SDVariable x,
SDVariable y)
Bitwise left shift operation.
|
SDVariable |
leftShiftCyclic(SDVariable x,
SDVariable y)
Bitwise left cyclical shift operation.
|
SDVariable |
leftShiftCyclic(String name,
SDVariable x,
SDVariable y)
Bitwise left cyclical shift operation.
|
SDVariable |
or(SDVariable x,
SDVariable y)
Bitwise OR operation.
|
SDVariable |
or(String name,
SDVariable x,
SDVariable y)
Bitwise OR operation.
|
SDVariable |
rightShift(SDVariable x,
SDVariable y)
Bitwise right shift operation.
|
SDVariable |
rightShift(String name,
SDVariable x,
SDVariable y)
Bitwise right shift operation.
|
SDVariable |
rightShiftCyclic(SDVariable x,
SDVariable y)
Bitwise right cyclical shift operation.
|
SDVariable |
rightShiftCyclic(String name,
SDVariable x,
SDVariable y)
Bitwise right cyclical shift operation.
|
SDVariable |
xor(SDVariable x,
SDVariable y)
Bitwise XOR operation (exclusive OR).
|
SDVariable |
xor(String name,
SDVariable x,
SDVariable y)
Bitwise XOR operation (exclusive OR).
|
public SDBitwise(SameDiff sameDiff)
public SDVariable and(SDVariable x, SDVariable y)
x
- First input array (INT type)y
- Second input array (INT type)public SDVariable and(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- First input array (INT type)y
- Second input array (INT type)public SDVariable bitRotl(SDVariable x, SDVariable shift)
x
- Input 1 (INT type)shift
- Number of bits to shift. (INT type)public SDVariable bitRotl(String name, SDVariable x, SDVariable shift)
name
- name May be null. Name for the output variablex
- Input 1 (INT type)shift
- Number of bits to shift. (INT type)public SDVariable bitRotr(SDVariable x, SDVariable shift)
x
- Input 1 (INT type)shift
- Number of bits to shift. (INT type)public SDVariable bitRotr(String name, SDVariable x, SDVariable shift)
name
- name May be null. Name for the output variablex
- Input 1 (INT type)shift
- Number of bits to shift. (INT type)public SDVariable bitShift(SDVariable x, SDVariable shift)
x
- Input 1 (INT type)shift
- Number of bits to shift. (INT type)public SDVariable bitShift(String name, SDVariable x, SDVariable shift)
name
- name May be null. Name for the output variablex
- Input 1 (INT type)shift
- Number of bits to shift. (INT type)public SDVariable bitShiftRight(SDVariable x, SDVariable shift)
x
- Input 1 (INT type)shift
- Number of bits to shift. (INT type)public SDVariable bitShiftRight(String name, SDVariable x, SDVariable shift)
name
- name May be null. Name for the output variablex
- Input 1 (INT type)shift
- Number of bits to shift. (INT type)public SDVariable bitsHammingDistance(SDVariable x, SDVariable y)
x
- First input array. (INT type)y
- Second input array. (INT type)public SDVariable bitsHammingDistance(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- First input array. (INT type)y
- Second input array. (INT type)public SDVariable leftShift(SDVariable x, SDVariable y)
x
- Input to be bit shifted (INT type)y
- Amount to shift elements of x array (INT type)public SDVariable leftShift(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input to be bit shifted (INT type)y
- Amount to shift elements of x array (INT type)public SDVariable leftShiftCyclic(SDVariable x, SDVariable y)
#leftShift(INDArray, INDArray)
the bits will "wrap around":leftShiftCyclic(01110000, 2) -> 11000001
x
- Input to be bit shifted (INT type)y
- Amount to shift elements of x array (INT type)public SDVariable leftShiftCyclic(String name, SDVariable x, SDVariable y)
#leftShift(INDArray, INDArray)
the bits will "wrap around":leftShiftCyclic(01110000, 2) -> 11000001
name
- name May be null. Name for the output variablex
- Input to be bit shifted (INT type)y
- Amount to shift elements of x array (INT type)public SDVariable or(SDVariable x, SDVariable y)
x
- First input array (INT type)y
- First input array (INT type)public SDVariable or(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- First input array (INT type)y
- First input array (INT type)public SDVariable rightShift(SDVariable x, SDVariable y)
x
- Input to be bit shifted (INT type)y
- Amount to shift elements of x array (INT type)public SDVariable rightShift(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- Input to be bit shifted (INT type)y
- Amount to shift elements of x array (INT type)public SDVariable rightShiftCyclic(SDVariable x, SDVariable y)
#rightShift(INDArray, INDArray)
the bits will "wrap around":rightShiftCyclic(00001110, 2) -> 10000011
x
- Input to be bit shifted (INT type)y
- Amount to shift elements of x array (INT type)public SDVariable rightShiftCyclic(String name, SDVariable x, SDVariable y)
#rightShift(INDArray, INDArray)
the bits will "wrap around":rightShiftCyclic(00001110, 2) -> 10000011
name
- name May be null. Name for the output variablex
- Input to be bit shifted (INT type)y
- Amount to shift elements of x array (INT type)public SDVariable xor(SDVariable x, SDVariable y)
x
- First input array (INT type)y
- First input array (INT type)public SDVariable xor(String name, SDVariable x, SDVariable y)
name
- name May be null. Name for the output variablex
- First input array (INT type)y
- First input array (INT type)Copyright © 2020. All rights reserved.