Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Commit

Permalink
Add back lost function.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Mar 10, 2020
1 parent 68edbfc commit c78efca
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/tensor/wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -341,3 +341,29 @@ function reduction!(

return C
end

function cutensorComputeType(T::DataType)
if T == Float32
return CUTENSOR_R_MIN_32F
elseif T == ComplexF32
return CUTENSOR_C_MIN_32F
elseif T == Float16
return CUTENSOR_R_MIN_16F
elseif T == ComplexF16
return CUTENSOR_C_MIN_16F
elseif T == Float64
return CUTENSOR_R_MIN_64F
elseif T == ComplexF64
return CUTENSOR_C_MIN_64F
elseif T == Int8
return CUTENSOR_R_MIN_8I
elseif T == Int32
return CUTENSOR_R_MIN_32I
elseif T == UInt8
return CUTENSOR_R_MIN_8U
elseif T == UInt32
return CUTENSOR_R_MIN_32U
else
throw(ArgumentError("cutensorComputeType equivalent for input type $T does not exist!"))
end
end

0 comments on commit c78efca

Please sign in to comment.