Home | History | Annotate | Download | only in util
      1 /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
      2 
      3 Licensed under the Apache License, Version 2.0 (the "License");
      4 you may not use this file except in compliance with the License.
      5 You may obtain a copy of the License at
      6 
      7     http://www.apache.org/licenses/LICENSE-2.0
      8 
      9 Unless required by applicable law or agreed to in writing, software
     10 distributed under the License is distributed on an "AS IS" BASIS,
     11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 See the License for the specific language governing permissions and
     13 limitations under the License.
     14 ==============================================================================*/
     15 %include "tensorflow/python/platform/base.i"
     16 
     17 %{
     18 #include "tensorflow/python/util/util.h"
     19 %}
     20 
     21 %ignoreall
     22 
     23 %unignore tensorflow;
     24 %unignore tensorflow::swig;
     25 // The %exception block defined in tf_session.i releases the Python GIL for
     26 // the length of each wrapped method. This file is included in tensorflow.i
     27 // after tf_session.i and inherits this definition. We disable this behavior
     28 // for functions in this module because they use python methods that need GIL.
     29 // TODO(iga): Find a way not to leak such definitions across files.
     30 
     31 %unignore tensorflow::swig::RegisterSequenceClass;
     32 %noexception tensorflow::swig::RegisterSequenceClass;
     33 
     34 %unignore tensorflow::swig::IsSequence;
     35 %noexception tensorflow::swig::IsSequence;
     36 
     37 %unignore tensorflow::swig::Flatten;
     38 %noexception tensorflow::swig::Flatten;
     39 
     40 %include "tensorflow/python/util/util.h"
     41 
     42 %unignoreall
     43