1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2025-01-14 12:59:47 +01:00
tensorflow-haskell/docs/haddock/tensorflow-0.1.0.0/src/TensorFlow-Internal-Raw.html
Greg Steuck ea8b62e47b Haddock (#3)
* Trivial script for regenerating haddocks: exclude .haddock files.

* Haddock regen
2016-10-25 12:43:06 -07:00

514 lines
92 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
<title>.stack-work/dist/x86_64-linux-dkd1ce2ff9c9560b648268df668d177711/Cabal-1.22.5.0/build/TensorFlow/Internal/Raw.hs</title>
<link type='text/css' rel='stylesheet' href='hscolour.css' />
</head>
<body>
<pre><a name="line-1"></a><span class='hs-comment'>-- GENERATED by C-&gt;Haskell Compiler, version 0.28.1 Switcheroo, 1 April 2016 (Haskell)</span>
<a name="line-2"></a><span class='hs-comment'>-- Edit the ORIGNAL .chs file instead!</span>
<a name="line-3"></a>
<a name="line-4"></a>
<a name="line-5"></a><span class='hs-comment'>{-# LINE 1 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-6"></a><span class='hs-comment'>-- Copyright 2016 TensorFlow authors.</span>
<a name="line-7"></a><span class='hs-comment'>--</span>
<a name="line-8"></a><span class='hs-comment'>-- Licensed under the Apache License, Version 2.0 (the "License");</span>
<a name="line-9"></a><span class='hs-comment'>-- you may not use this file except in compliance with the License.</span>
<a name="line-10"></a><span class='hs-comment'>-- You may obtain a copy of the License at</span>
<a name="line-11"></a><span class='hs-comment'>--</span>
<a name="line-12"></a><span class='hs-comment'>-- <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a></span>
<a name="line-13"></a><span class='hs-comment'>--</span>
<a name="line-14"></a><span class='hs-comment'>-- Unless required by applicable law or agreed to in writing, software</span>
<a name="line-15"></a><span class='hs-comment'>-- distributed under the License is distributed on an "AS IS" BASIS,</span>
<a name="line-16"></a><span class='hs-comment'>-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<a name="line-17"></a><span class='hs-comment'>-- See the License for the specific language governing permissions and</span>
<a name="line-18"></a><span class='hs-comment'>-- limitations under the License.</span>
<a name="line-19"></a>
<a name="line-20"></a><span class='hs-comment'>{-# LANGUAGE ForeignFunctionInterface #-}</span>
<a name="line-21"></a>
<a name="line-22"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>TensorFlow</span><span class='hs-varop'>.</span><span class='hs-conid'>Internal</span><span class='hs-varop'>.</span><span class='hs-conid'>Raw</span> <span class='hs-keyword'>where</span>
<a name="line-23"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>C</span><span class='hs-varop'>.</span><span class='hs-conid'>Types</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>C2HSImp</span>
<a name="line-24"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>C2HSImp</span>
<a name="line-25"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>Storable</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>C2HSImp</span>
<a name="line-26"></a>
<a name="line-27"></a>
<a name="line-28"></a>
<a name="line-29"></a>
<a name="line-30"></a>
<a name="line-31"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span>
<a name="line-32"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Foreign</span><span class='hs-varop'>.</span><span class='hs-conid'>C</span>
<a name="line-33"></a>
<a name="line-34"></a><a name="DataType"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>DataType</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_FLOAT</span>
<a name="line-35"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_DOUBLE</span>
<a name="line-36"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_INT32</span>
<a name="line-37"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_UINT8</span>
<a name="line-38"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_INT16</span>
<a name="line-39"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_INT8</span>
<a name="line-40"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_STRING</span>
<a name="line-41"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_COMPLEX64</span>
<a name="line-42"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_COMPLEX</span>
<a name="line-43"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_INT64</span>
<a name="line-44"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_BOOL</span>
<a name="line-45"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_QINT8</span>
<a name="line-46"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_QUINT8</span>
<a name="line-47"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_QINT32</span>
<a name="line-48"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_BFLOAT16</span>
<a name="line-49"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_QINT16</span>
<a name="line-50"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_QUINT16</span>
<a name="line-51"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_UINT16</span>
<a name="line-52"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_COMPLEX128</span>
<a name="line-53"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_HALF</span>
<a name="line-54"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_RESOURCE</span>
<a name="line-55"></a> <span class='hs-keyword'>deriving</span> <span class='hs-layout'>(</span><span class='hs-conid'>Show</span><span class='hs-layout'>,</span><span class='hs-conid'>Eq</span><span class='hs-layout'>)</span>
<a name="line-56"></a><a name="instance%20Enum%20DataType"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Enum</span> <span class='hs-conid'>DataType</span> <span class='hs-keyword'>where</span>
<a name="line-57"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_FLOAT</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_DOUBLE</span>
<a name="line-58"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_DOUBLE</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT32</span>
<a name="line-59"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_INT32</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UINT8</span>
<a name="line-60"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_UINT8</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT16</span>
<a name="line-61"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_INT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT8</span>
<a name="line-62"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_INT8</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_STRING</span>
<a name="line-63"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_STRING</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_COMPLEX64</span>
<a name="line-64"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_COMPLEX64</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT64</span>
<a name="line-65"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_COMPLEX</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT64</span>
<a name="line-66"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_INT64</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_BOOL</span>
<a name="line-67"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_BOOL</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QINT8</span>
<a name="line-68"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_QINT8</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QUINT8</span>
<a name="line-69"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_QUINT8</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QINT32</span>
<a name="line-70"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_QINT32</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_BFLOAT16</span>
<a name="line-71"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_BFLOAT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QINT16</span>
<a name="line-72"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_QINT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QUINT16</span>
<a name="line-73"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_QUINT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UINT16</span>
<a name="line-74"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_UINT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_COMPLEX128</span>
<a name="line-75"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_COMPLEX128</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_HALF</span>
<a name="line-76"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_HALF</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_RESOURCE</span>
<a name="line-77"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_RESOURCE</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>error</span> <span class='hs-str'>"DataType.succ: TF_RESOURCE has no successor"</span>
<a name="line-78"></a>
<a name="line-79"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_DOUBLE</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_FLOAT</span>
<a name="line-80"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_INT32</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_DOUBLE</span>
<a name="line-81"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_UINT8</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT32</span>
<a name="line-82"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_INT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UINT8</span>
<a name="line-83"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_INT8</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT16</span>
<a name="line-84"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_STRING</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT8</span>
<a name="line-85"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_COMPLEX64</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_STRING</span>
<a name="line-86"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_COMPLEX</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_STRING</span>
<a name="line-87"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_INT64</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_COMPLEX64</span>
<a name="line-88"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_BOOL</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT64</span>
<a name="line-89"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_QINT8</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_BOOL</span>
<a name="line-90"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_QUINT8</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QINT8</span>
<a name="line-91"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_QINT32</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QUINT8</span>
<a name="line-92"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_BFLOAT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QINT32</span>
<a name="line-93"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_QINT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_BFLOAT16</span>
<a name="line-94"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_QUINT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QINT16</span>
<a name="line-95"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_UINT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QUINT16</span>
<a name="line-96"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_COMPLEX128</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UINT16</span>
<a name="line-97"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_HALF</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_COMPLEX128</span>
<a name="line-98"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_RESOURCE</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_HALF</span>
<a name="line-99"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_FLOAT</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>error</span> <span class='hs-str'>"DataType.pred: TF_FLOAT has no predecessor"</span>
<a name="line-100"></a>
<a name="line-101"></a> <span class='hs-varid'>enumFromTo</span> <span class='hs-varid'>from</span> <span class='hs-varid'>to</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>go</span> <span class='hs-varid'>from</span>
<a name="line-102"></a> <span class='hs-keyword'>where</span>
<a name="line-103"></a> <span class='hs-varid'>end</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fromEnum</span> <span class='hs-varid'>to</span>
<a name="line-104"></a> <span class='hs-varid'>go</span> <span class='hs-varid'>v</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>compare</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromEnum</span> <span class='hs-varid'>v</span><span class='hs-layout'>)</span> <span class='hs-varid'>end</span> <span class='hs-keyword'>of</span>
<a name="line-105"></a> <span class='hs-conid'>LT</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>v</span> <span class='hs-conop'>:</span> <span class='hs-varid'>go</span> <span class='hs-layout'>(</span><span class='hs-varid'>succ</span> <span class='hs-varid'>v</span><span class='hs-layout'>)</span>
<a name="line-106"></a> <span class='hs-conid'>EQ</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>v</span><span class='hs-keyglyph'>]</span>
<a name="line-107"></a> <span class='hs-conid'>GT</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>[]</span>
<a name="line-108"></a>
<a name="line-109"></a> <span class='hs-varid'>enumFrom</span> <span class='hs-varid'>from</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>enumFromTo</span> <span class='hs-varid'>from</span> <span class='hs-conid'>TF_RESOURCE</span>
<a name="line-110"></a>
<a name="line-111"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_FLOAT</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>1</span>
<a name="line-112"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_DOUBLE</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>2</span>
<a name="line-113"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_INT32</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>3</span>
<a name="line-114"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_UINT8</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>4</span>
<a name="line-115"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_INT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>5</span>
<a name="line-116"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_INT8</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>6</span>
<a name="line-117"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_STRING</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>7</span>
<a name="line-118"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_COMPLEX64</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>8</span>
<a name="line-119"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_COMPLEX</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>8</span>
<a name="line-120"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_INT64</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>9</span>
<a name="line-121"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_BOOL</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>10</span>
<a name="line-122"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_QINT8</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>11</span>
<a name="line-123"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_QUINT8</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>12</span>
<a name="line-124"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_QINT32</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>13</span>
<a name="line-125"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_BFLOAT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>14</span>
<a name="line-126"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_QINT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>15</span>
<a name="line-127"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_QUINT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>16</span>
<a name="line-128"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_UINT16</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>17</span>
<a name="line-129"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_COMPLEX128</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>18</span>
<a name="line-130"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_HALF</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>19</span>
<a name="line-131"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_RESOURCE</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>20</span>
<a name="line-132"></a>
<a name="line-133"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_FLOAT</span>
<a name="line-134"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>2</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_DOUBLE</span>
<a name="line-135"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>3</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT32</span>
<a name="line-136"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>4</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UINT8</span>
<a name="line-137"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>5</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT16</span>
<a name="line-138"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>6</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT8</span>
<a name="line-139"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>7</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_STRING</span>
<a name="line-140"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>8</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_COMPLEX64</span>
<a name="line-141"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>9</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INT64</span>
<a name="line-142"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>10</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_BOOL</span>
<a name="line-143"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>11</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QINT8</span>
<a name="line-144"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>12</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QUINT8</span>
<a name="line-145"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>13</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QINT32</span>
<a name="line-146"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>14</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_BFLOAT16</span>
<a name="line-147"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>15</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QINT16</span>
<a name="line-148"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>16</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_QUINT16</span>
<a name="line-149"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>17</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UINT16</span>
<a name="line-150"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>18</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_COMPLEX128</span>
<a name="line-151"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>19</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_HALF</span>
<a name="line-152"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>20</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_RESOURCE</span>
<a name="line-153"></a> <span class='hs-varid'>toEnum</span> <span class='hs-varid'>unmatched</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>error</span> <span class='hs-layout'>(</span><span class='hs-str'>"DataType.toEnum: Cannot match "</span> <span class='hs-varop'>++</span> <span class='hs-varid'>show</span> <span class='hs-varid'>unmatched</span><span class='hs-layout'>)</span>
<a name="line-154"></a>
<a name="line-155"></a><span class='hs-comment'>{-# LINE 24 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-156"></a>
<a name="line-157"></a><a name="Code"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>Code</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_OK</span>
<a name="line-158"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_CANCELLED</span>
<a name="line-159"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_UNKNOWN</span>
<a name="line-160"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_INVALID_ARGUMENT</span>
<a name="line-161"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_DEADLINE_EXCEEDED</span>
<a name="line-162"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_NOT_FOUND</span>
<a name="line-163"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_ALREADY_EXISTS</span>
<a name="line-164"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_PERMISSION_DENIED</span>
<a name="line-165"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_RESOURCE_EXHAUSTED</span>
<a name="line-166"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_FAILED_PRECONDITION</span>
<a name="line-167"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_ABORTED</span>
<a name="line-168"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_OUT_OF_RANGE</span>
<a name="line-169"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_UNIMPLEMENTED</span>
<a name="line-170"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_INTERNAL</span>
<a name="line-171"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_UNAVAILABLE</span>
<a name="line-172"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_DATA_LOSS</span>
<a name="line-173"></a> <span class='hs-keyglyph'>|</span> <span class='hs-conid'>TF_UNAUTHENTICATED</span>
<a name="line-174"></a> <span class='hs-keyword'>deriving</span> <span class='hs-layout'>(</span><span class='hs-conid'>Show</span><span class='hs-layout'>,</span><span class='hs-conid'>Eq</span><span class='hs-layout'>)</span>
<a name="line-175"></a><a name="instance%20Enum%20Code"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Enum</span> <span class='hs-conid'>Code</span> <span class='hs-keyword'>where</span>
<a name="line-176"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_OK</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_CANCELLED</span>
<a name="line-177"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_CANCELLED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UNKNOWN</span>
<a name="line-178"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_UNKNOWN</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INVALID_ARGUMENT</span>
<a name="line-179"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_INVALID_ARGUMENT</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_DEADLINE_EXCEEDED</span>
<a name="line-180"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_DEADLINE_EXCEEDED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_NOT_FOUND</span>
<a name="line-181"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_NOT_FOUND</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_ALREADY_EXISTS</span>
<a name="line-182"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_ALREADY_EXISTS</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_PERMISSION_DENIED</span>
<a name="line-183"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_PERMISSION_DENIED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_RESOURCE_EXHAUSTED</span>
<a name="line-184"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_RESOURCE_EXHAUSTED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_FAILED_PRECONDITION</span>
<a name="line-185"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_FAILED_PRECONDITION</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_ABORTED</span>
<a name="line-186"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_ABORTED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_OUT_OF_RANGE</span>
<a name="line-187"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_OUT_OF_RANGE</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UNIMPLEMENTED</span>
<a name="line-188"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_UNIMPLEMENTED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INTERNAL</span>
<a name="line-189"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_INTERNAL</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UNAVAILABLE</span>
<a name="line-190"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_UNAVAILABLE</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_DATA_LOSS</span>
<a name="line-191"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_DATA_LOSS</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UNAUTHENTICATED</span>
<a name="line-192"></a> <span class='hs-varid'>succ</span> <span class='hs-conid'>TF_UNAUTHENTICATED</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>error</span> <span class='hs-str'>"Code.succ: TF_UNAUTHENTICATED has no successor"</span>
<a name="line-193"></a>
<a name="line-194"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_CANCELLED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_OK</span>
<a name="line-195"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_UNKNOWN</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_CANCELLED</span>
<a name="line-196"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_INVALID_ARGUMENT</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UNKNOWN</span>
<a name="line-197"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_DEADLINE_EXCEEDED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INVALID_ARGUMENT</span>
<a name="line-198"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_NOT_FOUND</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_DEADLINE_EXCEEDED</span>
<a name="line-199"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_ALREADY_EXISTS</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_NOT_FOUND</span>
<a name="line-200"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_PERMISSION_DENIED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_ALREADY_EXISTS</span>
<a name="line-201"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_RESOURCE_EXHAUSTED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_PERMISSION_DENIED</span>
<a name="line-202"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_FAILED_PRECONDITION</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_RESOURCE_EXHAUSTED</span>
<a name="line-203"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_ABORTED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_FAILED_PRECONDITION</span>
<a name="line-204"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_OUT_OF_RANGE</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_ABORTED</span>
<a name="line-205"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_UNIMPLEMENTED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_OUT_OF_RANGE</span>
<a name="line-206"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_INTERNAL</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UNIMPLEMENTED</span>
<a name="line-207"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_UNAVAILABLE</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INTERNAL</span>
<a name="line-208"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_DATA_LOSS</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UNAVAILABLE</span>
<a name="line-209"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_UNAUTHENTICATED</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_DATA_LOSS</span>
<a name="line-210"></a> <span class='hs-varid'>pred</span> <span class='hs-conid'>TF_OK</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>error</span> <span class='hs-str'>"Code.pred: TF_OK has no predecessor"</span>
<a name="line-211"></a>
<a name="line-212"></a> <span class='hs-varid'>enumFromTo</span> <span class='hs-varid'>from</span> <span class='hs-varid'>to</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>go</span> <span class='hs-varid'>from</span>
<a name="line-213"></a> <span class='hs-keyword'>where</span>
<a name="line-214"></a> <span class='hs-varid'>end</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fromEnum</span> <span class='hs-varid'>to</span>
<a name="line-215"></a> <span class='hs-varid'>go</span> <span class='hs-varid'>v</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>compare</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromEnum</span> <span class='hs-varid'>v</span><span class='hs-layout'>)</span> <span class='hs-varid'>end</span> <span class='hs-keyword'>of</span>
<a name="line-216"></a> <span class='hs-conid'>LT</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>v</span> <span class='hs-conop'>:</span> <span class='hs-varid'>go</span> <span class='hs-layout'>(</span><span class='hs-varid'>succ</span> <span class='hs-varid'>v</span><span class='hs-layout'>)</span>
<a name="line-217"></a> <span class='hs-conid'>EQ</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>v</span><span class='hs-keyglyph'>]</span>
<a name="line-218"></a> <span class='hs-conid'>GT</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>[]</span>
<a name="line-219"></a>
<a name="line-220"></a> <span class='hs-varid'>enumFrom</span> <span class='hs-varid'>from</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>enumFromTo</span> <span class='hs-varid'>from</span> <span class='hs-conid'>TF_UNAUTHENTICATED</span>
<a name="line-221"></a>
<a name="line-222"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_OK</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>0</span>
<a name="line-223"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_CANCELLED</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>1</span>
<a name="line-224"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_UNKNOWN</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>2</span>
<a name="line-225"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_INVALID_ARGUMENT</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>3</span>
<a name="line-226"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_DEADLINE_EXCEEDED</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>4</span>
<a name="line-227"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_NOT_FOUND</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>5</span>
<a name="line-228"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_ALREADY_EXISTS</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>6</span>
<a name="line-229"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_PERMISSION_DENIED</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>7</span>
<a name="line-230"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_RESOURCE_EXHAUSTED</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>8</span>
<a name="line-231"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_FAILED_PRECONDITION</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>9</span>
<a name="line-232"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_ABORTED</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>10</span>
<a name="line-233"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_OUT_OF_RANGE</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>11</span>
<a name="line-234"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_UNIMPLEMENTED</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>12</span>
<a name="line-235"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_INTERNAL</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>13</span>
<a name="line-236"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_UNAVAILABLE</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>14</span>
<a name="line-237"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_DATA_LOSS</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>15</span>
<a name="line-238"></a> <span class='hs-varid'>fromEnum</span> <span class='hs-conid'>TF_UNAUTHENTICATED</span> <span class='hs-keyglyph'>=</span> <span class='hs-num'>16</span>
<a name="line-239"></a>
<a name="line-240"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_OK</span>
<a name="line-241"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>1</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_CANCELLED</span>
<a name="line-242"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>2</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UNKNOWN</span>
<a name="line-243"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>3</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INVALID_ARGUMENT</span>
<a name="line-244"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>4</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_DEADLINE_EXCEEDED</span>
<a name="line-245"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>5</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_NOT_FOUND</span>
<a name="line-246"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>6</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_ALREADY_EXISTS</span>
<a name="line-247"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>7</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_PERMISSION_DENIED</span>
<a name="line-248"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>8</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_RESOURCE_EXHAUSTED</span>
<a name="line-249"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>9</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_FAILED_PRECONDITION</span>
<a name="line-250"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>10</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_ABORTED</span>
<a name="line-251"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>11</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_OUT_OF_RANGE</span>
<a name="line-252"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>12</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UNIMPLEMENTED</span>
<a name="line-253"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>13</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_INTERNAL</span>
<a name="line-254"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>14</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UNAVAILABLE</span>
<a name="line-255"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>15</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_DATA_LOSS</span>
<a name="line-256"></a> <span class='hs-varid'>toEnum</span> <span class='hs-num'>16</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>TF_UNAUTHENTICATED</span>
<a name="line-257"></a> <span class='hs-varid'>toEnum</span> <span class='hs-varid'>unmatched</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>error</span> <span class='hs-layout'>(</span><span class='hs-str'>"Code.toEnum: Cannot match "</span> <span class='hs-varop'>++</span> <span class='hs-varid'>show</span> <span class='hs-varid'>unmatched</span><span class='hs-layout'>)</span>
<a name="line-258"></a>
<a name="line-259"></a><span class='hs-comment'>{-# LINE 25 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-260"></a>
<a name="line-261"></a>
<a name="line-262"></a>
<a name="line-263"></a><a name="Status"></a><span class='hs-comment'>-- Status.</span>
<a name="line-264"></a><a name="Status"></a><span class='hs-keyword'>newtype</span> <span class='hs-conid'>Status</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Status</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Status</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-265"></a><span class='hs-comment'>{-# LINE 29 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-266"></a>
<a name="line-267"></a>
<a name="line-268"></a><a name="newStatus"></a><span class='hs-definition'>newStatus</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Status</span>
<a name="line-269"></a><span class='hs-definition'>newStatus</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFNewStatus</span>
<a name="line-270"></a><span class='hs-comment'>{-# LINE 32 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-271"></a>
<a name="line-272"></a>
<a name="line-273"></a><a name="deleteStatus"></a><span class='hs-definition'>deleteStatus</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Status</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-274"></a><span class='hs-definition'>deleteStatus</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFDeleteStatus</span>
<a name="line-275"></a><span class='hs-comment'>{-# LINE 35 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-276"></a>
<a name="line-277"></a>
<a name="line-278"></a><a name="setStatus"></a><span class='hs-definition'>setStatus</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Status</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Code</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>CString</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-279"></a><span class='hs-definition'>setStatus</span> <span class='hs-varid'>s</span> <span class='hs-varid'>c</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFSetStatus</span> <span class='hs-varid'>s</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromIntegral</span> <span class='hs-varop'>$</span> <span class='hs-varid'>fromEnum</span> <span class='hs-varid'>c</span><span class='hs-layout'>)</span>
<a name="line-280"></a>
<a name="line-281"></a><a name="getCode"></a><span class='hs-definition'>getCode</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Status</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Code</span>
<a name="line-282"></a><span class='hs-definition'>getCode</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>toEnum</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromIntegral</span> <span class='hs-varop'>&lt;$&gt;</span> <span class='hs-varid'>tFGetCode</span> <span class='hs-varid'>s</span>
<a name="line-283"></a>
<a name="line-284"></a><a name="message"></a><span class='hs-definition'>message</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Status</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>CString</span>
<a name="line-285"></a><span class='hs-definition'>message</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFMessage</span>
<a name="line-286"></a><span class='hs-comment'>{-# LINE 44 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-287"></a>
<a name="line-288"></a>
<a name="line-289"></a>
<a name="line-290"></a><a name="Buffer"></a><span class='hs-comment'>-- Buffer.</span>
<a name="line-291"></a><a name="Buffer"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>Buffer</span>
<a name="line-292"></a><a name="BufferPtr"></a><span class='hs-keyword'>type</span> <span class='hs-conid'>BufferPtr</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Buffer</span><span class='hs-layout'>)</span>
<a name="line-293"></a><span class='hs-comment'>{-# LINE 49 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-294"></a>
<a name="line-295"></a>
<a name="line-296"></a><a name="getBufferData"></a><span class='hs-definition'>getBufferData</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>BufferPtr</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-297"></a><span class='hs-definition'>getBufferData</span> <span class='hs-keyglyph'>=</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>ptr</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span> <span class='hs-layout'>{</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-varid'>peekByteOff</span> <span class='hs-varid'>ptr</span> <span class='hs-num'>0</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>}</span><span class='hs-layout'>)</span>
<a name="line-298"></a><span class='hs-comment'>{-# LINE 52 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-299"></a>
<a name="line-300"></a>
<a name="line-301"></a><a name="getBufferLength"></a><span class='hs-definition'>getBufferLength</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>BufferPtr</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>CULong</span>
<a name="line-302"></a><span class='hs-definition'>getBufferLength</span> <span class='hs-keyglyph'>=</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>ptr</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-keyword'>do</span> <span class='hs-layout'>{</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-varid'>peekByteOff</span> <span class='hs-varid'>ptr</span> <span class='hs-num'>8</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CULong</span><span class='hs-layout'>}</span><span class='hs-layout'>)</span>
<a name="line-303"></a><span class='hs-comment'>{-# LINE 55 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-304"></a>
<a name="line-305"></a>
<a name="line-306"></a><a name="Tensor"></a><span class='hs-comment'>-- Tensor.</span>
<a name="line-307"></a><a name="Tensor"></a><span class='hs-keyword'>newtype</span> <span class='hs-conid'>Tensor</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Tensor</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-308"></a><span class='hs-comment'>{-# LINE 58 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-309"></a>
<a name="line-310"></a>
<a name="line-311"></a><a name="instance%20Storable%20Tensor"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Storable</span> <span class='hs-conid'>Tensor</span> <span class='hs-keyword'>where</span>
<a name="line-312"></a> <span class='hs-varid'>sizeOf</span> <span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>sizeOf</span> <span class='hs-varid'>t</span>
<a name="line-313"></a> <span class='hs-varid'>alignment</span> <span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>alignment</span> <span class='hs-varid'>t</span>
<a name="line-314"></a> <span class='hs-varid'>peek</span> <span class='hs-varid'>p</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fmap</span> <span class='hs-conid'>Tensor</span> <span class='hs-layout'>(</span><span class='hs-varid'>peek</span> <span class='hs-layout'>(</span><span class='hs-varid'>castPtr</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-315"></a> <span class='hs-varid'>poke</span> <span class='hs-varid'>p</span> <span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>poke</span> <span class='hs-layout'>(</span><span class='hs-varid'>castPtr</span> <span class='hs-varid'>p</span><span class='hs-layout'>)</span> <span class='hs-varid'>t</span>
<a name="line-316"></a>
<a name="line-317"></a><a name="newTensor"></a><span class='hs-definition'>newTensor</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>DataType</span>
<a name="line-318"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CLong</span> <span class='hs-comment'>-- dimensions array</span>
<a name="line-319"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>CInt</span> <span class='hs-comment'>-- num dimensions</span>
<a name="line-320"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span> <span class='hs-comment'>-- data</span>
<a name="line-321"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>CULong</span> <span class='hs-comment'>-- data len</span>
<a name="line-322"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>FunPtr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>CULong</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span> <span class='hs-comment'>-- deallocator</span>
<a name="line-323"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span> <span class='hs-comment'>-- deallocator arg</span>
<a name="line-324"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Tensor</span>
<a name="line-325"></a><span class='hs-definition'>newTensor</span> <span class='hs-varid'>dt</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFNewTensor</span> <span class='hs-layout'>(</span><span class='hs-varid'>fromIntegral</span> <span class='hs-varop'>$</span> <span class='hs-varid'>fromEnum</span> <span class='hs-varid'>dt</span><span class='hs-layout'>)</span>
<a name="line-326"></a>
<a name="line-327"></a><a name="deleteTensor"></a><span class='hs-definition'>deleteTensor</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Tensor</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-328"></a><span class='hs-definition'>deleteTensor</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFDeleteTensor</span>
<a name="line-329"></a><span class='hs-comment'>{-# LINE 77 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-330"></a>
<a name="line-331"></a>
<a name="line-332"></a><a name="tensorType"></a><span class='hs-definition'>tensorType</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Tensor</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>DataType</span>
<a name="line-333"></a><span class='hs-definition'>tensorType</span> <span class='hs-varid'>t</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>toEnum</span> <span class='hs-varop'>.</span> <span class='hs-varid'>fromIntegral</span> <span class='hs-varop'>&lt;$&gt;</span> <span class='hs-varid'>tFTensorType</span> <span class='hs-varid'>t</span>
<a name="line-334"></a>
<a name="line-335"></a><a name="numDims"></a><span class='hs-definition'>numDims</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Tensor</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>CInt</span>
<a name="line-336"></a><span class='hs-definition'>numDims</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFNumDims</span>
<a name="line-337"></a><span class='hs-comment'>{-# LINE 83 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-338"></a>
<a name="line-339"></a>
<a name="line-340"></a><a name="dim"></a><span class='hs-definition'>dim</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Tensor</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>CInt</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>CLong</span>
<a name="line-341"></a><span class='hs-definition'>dim</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFDim</span>
<a name="line-342"></a><span class='hs-comment'>{-# LINE 86 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-343"></a>
<a name="line-344"></a>
<a name="line-345"></a><a name="tensorByteSize"></a><span class='hs-definition'>tensorByteSize</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Tensor</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>CULong</span>
<a name="line-346"></a><span class='hs-definition'>tensorByteSize</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFTensorByteSize</span>
<a name="line-347"></a><span class='hs-comment'>{-# LINE 89 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-348"></a>
<a name="line-349"></a>
<a name="line-350"></a><a name="tensorData"></a><span class='hs-definition'>tensorData</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Tensor</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-351"></a><span class='hs-definition'>tensorData</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFTensorData</span>
<a name="line-352"></a><span class='hs-comment'>{-# LINE 92 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-353"></a>
<a name="line-354"></a>
<a name="line-355"></a>
<a name="line-356"></a><a name="SessionOptions"></a><span class='hs-comment'>-- Session Options.</span>
<a name="line-357"></a><a name="SessionOptions"></a><span class='hs-keyword'>newtype</span> <span class='hs-conid'>SessionOptions</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>SessionOptions</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-layout'>(</span><span class='hs-conid'>SessionOptions</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-358"></a><span class='hs-comment'>{-# LINE 96 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-359"></a>
<a name="line-360"></a>
<a name="line-361"></a><a name="newSessionOptions"></a><span class='hs-definition'>newSessionOptions</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>SessionOptions</span>
<a name="line-362"></a><span class='hs-definition'>newSessionOptions</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFNewSessionOptions</span>
<a name="line-363"></a><span class='hs-comment'>{-# LINE 99 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-364"></a>
<a name="line-365"></a>
<a name="line-366"></a><a name="setTarget"></a><span class='hs-definition'>setTarget</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>SessionOptions</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>CString</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-367"></a><span class='hs-definition'>setTarget</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFSetTarget</span>
<a name="line-368"></a><span class='hs-comment'>{-# LINE 102 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-369"></a>
<a name="line-370"></a>
<a name="line-371"></a><a name="setConfig"></a><span class='hs-definition'>setConfig</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>SessionOptions</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>CULong</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Status</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-372"></a><span class='hs-definition'>setConfig</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFSetConfig</span>
<a name="line-373"></a><span class='hs-comment'>{-# LINE 105 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-374"></a>
<a name="line-375"></a>
<a name="line-376"></a><a name="deleteSessionOptions"></a><span class='hs-definition'>deleteSessionOptions</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>SessionOptions</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-377"></a><span class='hs-definition'>deleteSessionOptions</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFDeleteSessionOptions</span>
<a name="line-378"></a><span class='hs-comment'>{-# LINE 108 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-379"></a>
<a name="line-380"></a>
<a name="line-381"></a>
<a name="line-382"></a><a name="Session"></a><span class='hs-comment'>-- Session.</span>
<a name="line-383"></a><a name="Session"></a><span class='hs-keyword'>newtype</span> <span class='hs-conid'>Session</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Session</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Session</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-384"></a><span class='hs-comment'>{-# LINE 112 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-385"></a>
<a name="line-386"></a>
<a name="line-387"></a><a name="newSession"></a><span class='hs-definition'>newSession</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>SessionOptions</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Status</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>Session</span>
<a name="line-388"></a><span class='hs-definition'>newSession</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFNewSession</span>
<a name="line-389"></a><span class='hs-comment'>{-# LINE 115 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-390"></a>
<a name="line-391"></a>
<a name="line-392"></a><a name="closeSession"></a><span class='hs-definition'>closeSession</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Session</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Status</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-393"></a><span class='hs-definition'>closeSession</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFCloseSession</span>
<a name="line-394"></a><span class='hs-comment'>{-# LINE 118 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-395"></a>
<a name="line-396"></a>
<a name="line-397"></a><a name="deleteSession"></a><span class='hs-definition'>deleteSession</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Session</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Status</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-398"></a><span class='hs-definition'>deleteSession</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFDeleteSession</span>
<a name="line-399"></a><span class='hs-comment'>{-# LINE 121 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-400"></a>
<a name="line-401"></a>
<a name="line-402"></a><a name="extendGraph"></a><span class='hs-definition'>extendGraph</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Session</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>CULong</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Status</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-403"></a><span class='hs-definition'>extendGraph</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFExtendGraph</span>
<a name="line-404"></a><span class='hs-comment'>{-# LINE 124 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-405"></a>
<a name="line-406"></a>
<a name="line-407"></a><a name="run"></a><span class='hs-definition'>run</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Session</span>
<a name="line-408"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>BufferPtr</span> <span class='hs-comment'>-- RunOptions proto.</span>
<a name="line-409"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CString</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>Tensor</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>CInt</span> <span class='hs-comment'>-- Input (names, tensors, count).</span>
<a name="line-410"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CString</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>Tensor</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>CInt</span> <span class='hs-comment'>-- Output (names, tensors, count).</span>
<a name="line-411"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>CString</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>CInt</span> <span class='hs-comment'>-- Target nodes (names, count).</span>
<a name="line-412"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>BufferPtr</span> <span class='hs-comment'>-- RunMetadata proto.</span>
<a name="line-413"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Status</span>
<a name="line-414"></a> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-415"></a><span class='hs-definition'>run</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFRun</span>
<a name="line-416"></a><span class='hs-comment'>{-# LINE 134 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-417"></a>
<a name="line-418"></a>
<a name="line-419"></a><a name="TensorDeallocFn"></a><span class='hs-comment'>-- FFI helpers.</span>
<a name="line-420"></a><a name="TensorDeallocFn"></a><span class='hs-keyword'>type</span> <span class='hs-conid'>TensorDeallocFn</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>CULong</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span>
<a name="line-421"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"wrapper"</span>
<a name="line-422"></a> <span class='hs-varid'>wrapTensorDealloc</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>TensorDeallocFn</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>FunPtr</span> <span class='hs-conid'>TensorDeallocFn</span><span class='hs-layout'>)</span>
<a name="line-423"></a>
<a name="line-424"></a>
<a name="line-425"></a><a name="getAllOpList"></a><span class='hs-comment'>-- | Get the OpList of all OpDefs defined in this address space.</span>
<a name="line-426"></a><span class='hs-comment'>-- Returns a BufferPtr, ownership of which is transferred to the caller</span>
<a name="line-427"></a><span class='hs-comment'>-- (and can be freed using deleteBuffer).</span>
<a name="line-428"></a><span class='hs-comment'>--</span>
<a name="line-429"></a><span class='hs-comment'>-- The data in the buffer will be the serialized OpList proto for ops registered</span>
<a name="line-430"></a><span class='hs-comment'>-- in this address space.</span>
<a name="line-431"></a><span class='hs-definition'>getAllOpList</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>BufferPtr</span>
<a name="line-432"></a><span class='hs-definition'>getAllOpList</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>tFGetAllOpList</span>
<a name="line-433"></a><span class='hs-comment'>{-# LINE 149 "src/TensorFlow/Internal/Raw.chs" #-}</span>
<a name="line-434"></a>
<a name="line-435"></a>
<a name="line-436"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-str'>"&amp;TF_DeleteBuffer"</span>
<a name="line-437"></a> <span class='hs-varid'>deleteBuffer</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>FunPtr</span> <span class='hs-layout'>(</span><span class='hs-conid'>BufferPtr</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-438"></a>
<a name="line-439"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_NewStatus"</span>
<a name="line-440"></a> <span class='hs-varid'>tFNewStatus</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Status</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-441"></a>
<a name="line-442"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_DeleteStatus"</span>
<a name="line-443"></a> <span class='hs-varid'>tFDeleteStatus</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Status</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-444"></a>
<a name="line-445"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_SetStatus"</span>
<a name="line-446"></a> <span class='hs-varid'>tFSetStatus</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Status</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CInt</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CChar</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-447"></a>
<a name="line-448"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_GetCode"</span>
<a name="line-449"></a> <span class='hs-varid'>tFGetCode</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Status</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CInt</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-450"></a>
<a name="line-451"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_Message"</span>
<a name="line-452"></a> <span class='hs-varid'>tFMessage</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Status</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CChar</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-453"></a>
<a name="line-454"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_NewTensor"</span>
<a name="line-455"></a> <span class='hs-varid'>tFNewTensor</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CInt</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CLong</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CInt</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CULong</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>FunPtr</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CULong</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-456"></a>
<a name="line-457"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_DeleteTensor"</span>
<a name="line-458"></a> <span class='hs-varid'>tFDeleteTensor</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-459"></a>
<a name="line-460"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_TensorType"</span>
<a name="line-461"></a> <span class='hs-varid'>tFTensorType</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CInt</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-462"></a>
<a name="line-463"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_NumDims"</span>
<a name="line-464"></a> <span class='hs-varid'>tFNumDims</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CInt</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-465"></a>
<a name="line-466"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_Dim"</span>
<a name="line-467"></a> <span class='hs-varid'>tFDim</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CInt</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CLong</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-468"></a>
<a name="line-469"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_TensorByteSize"</span>
<a name="line-470"></a> <span class='hs-varid'>tFTensorByteSize</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CULong</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-471"></a>
<a name="line-472"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_TensorData"</span>
<a name="line-473"></a> <span class='hs-varid'>tFTensorData</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-474"></a>
<a name="line-475"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_NewSessionOptions"</span>
<a name="line-476"></a> <span class='hs-varid'>tFNewSessionOptions</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>SessionOptions</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-477"></a>
<a name="line-478"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_SetTarget"</span>
<a name="line-479"></a> <span class='hs-varid'>tFSetTarget</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>SessionOptions</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CChar</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-480"></a>
<a name="line-481"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_SetConfig"</span>
<a name="line-482"></a> <span class='hs-varid'>tFSetConfig</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>SessionOptions</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CULong</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Status</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-483"></a>
<a name="line-484"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_DeleteSessionOptions"</span>
<a name="line-485"></a> <span class='hs-varid'>tFDeleteSessionOptions</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>SessionOptions</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-486"></a>
<a name="line-487"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_NewSession"</span>
<a name="line-488"></a> <span class='hs-varid'>tFNewSession</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>SessionOptions</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Status</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>Session</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-489"></a>
<a name="line-490"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_CloseSession"</span>
<a name="line-491"></a> <span class='hs-varid'>tFCloseSession</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Session</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Status</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-492"></a>
<a name="line-493"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_DeleteSession"</span>
<a name="line-494"></a> <span class='hs-varid'>tFDeleteSession</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Session</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Status</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-495"></a>
<a name="line-496"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_ExtendGraph"</span>
<a name="line-497"></a> <span class='hs-varid'>tFExtendGraph</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Session</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CULong</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Status</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-498"></a>
<a name="line-499"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_Run"</span>
<a name="line-500"></a> <span class='hs-varid'>tFRun</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Session</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>BufferPtr</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CChar</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CInt</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CChar</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-layout'>(</span><span class='hs-conid'>Tensor</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CInt</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>Ptr</span> <span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CChar</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>C2HSImp</span><span class='hs-varop'>.</span><span class='hs-conid'>CInt</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>BufferPtr</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-layout'>(</span><span class='hs-conid'>Status</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-501"></a>
<a name="line-502"></a><span class='hs-keyword'>foreign</span> <span class='hs-keyword'>import</span> <span class='hs-keyword'>ccall</span> <span class='hs-keyword'>safe</span> <span class='hs-str'>"TensorFlow/Internal/Raw.chs.h TF_GetAllOpList"</span>
<a name="line-503"></a> <span class='hs-varid'>tFGetAllOpList</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>IO</span> <span class='hs-layout'>(</span><span class='hs-conid'>BufferPtr</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
</pre></body>
</html>