ID int64 0 2.65k | Language stringclasses 1
value | Repository Name stringclasses 14
values | File Name stringlengths 2 48 | File Path in Repository stringlengths 11 111 ⌀ | File Path for Unit Test stringlengths 16 116 ⌀ | Code stringlengths 411 31.4k | Unit Test - (Ground Truth) stringlengths 40 32.1k |
|---|---|---|---|---|---|---|---|
2,600 | cpp | google/tsl | strcat | tsl/platform/strcat.cc | tsl/platform/strcat_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_STRCAT_H_
#define TENSORFLOW_TSL_PLATFORM_STRCAT_H_
#include <string>
#include "tsl/platform/macros.h"
#include "tsl/platform/numbers.h"
#include "tsl/platform/stringpiece.h"
#include "tsl/platform/types.h"
namespace tsl {
namespace strings {
enum PadSpec {
kNoPad = 1,
kZeroPad2,
k... | #include "tsl/platform/strcat.h"
#include <string>
#include "absl/strings/string_view.h"
#include "tsl/platform/stringprintf.h"
#include "tsl/platform/test.h"
#include "tsl/platform/types.h"
#ifdef _MSC_VER
typedef ptrdiff_t ssize_t;
#endif
namespace tsl {
namespace strings {
TEST(StrCat, Ints) {
const int16_t s = -1... |
2,601 | cpp | google/tsl | hash | tsl/platform/hash.cc | tsl/platform/hash_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_HASH_H_
#define TENSORFLOW_TSL_PLATFORM_HASH_H_
#include <stddef.h>
#include <stdint.h>
#include <functional>
#include <string>
#include "tsl/platform/stringpiece.h"
#include "tsl/platform/types.h"
namespace tsl {
extern uint32 Hash32(const char* data, size_t n, uint32 seed);
extern uint... | #include <map>
#include <unordered_map>
#include <vector>
#include "tsl/platform/hash.h"
#include "tsl/platform/logging.h"
#include "tsl/platform/test.h"
#include "tsl/platform/test_benchmark.h"
namespace tsl {
TEST(Hash, SignedUnsignedIssue) {
const unsigned char d1[1] = {0x62};
const unsigned char d2[2] = {0xc3, ... |
2,602 | cpp | google/tsl | setround | tsl/platform/setround.cc | tsl/platform/setround_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_SETROUND_H_
#define TENSORFLOW_TSL_PLATFORM_SETROUND_H_
#if defined(__ANDROID_API__) && (__ANDROID_API__ < 21)
#define TF_BROKEN_CFENV
#endif
#if defined(TF_BROKEN_CFENV)
#include <fenv.h>
#else
#include <cfenv>
#endif
#include "tsl/platform/macros.h"
namespace tsl {
namespace port {... | #include "tsl/platform/setround.h"
#include <cmath>
#include "tsl/platform/test.h"
#if !defined(__clang__) || !defined(__OPTIMIZE__)
namespace tsl {
namespace {
void CheckDownward() {
EXPECT_EQ(12, std::nearbyint(12.0));
EXPECT_EQ(12, std::nearbyint(12.1));
EXPECT_EQ(-13, std::nearbyint(-12.1));
EXPECT_EQ(12, s... |
2,603 | cpp | google/tsl | path | tsl/platform/path.cc | tsl/platform/path_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_PATH_H_
#define TENSORFLOW_TSL_PLATFORM_PATH_H_
#include <string>
#include "tsl/platform/stringpiece.h"
#include "tsl/platform/types.h"
namespace tsl {
namespace io {
namespace internal {
std::string JoinPathImpl(std::initializer_list<tsl::StringPiece> paths);
}
#ifndef SWIG
template <... | #include "tsl/platform/path.h"
#include <string>
#include "tsl/platform/env.h"
#include "tsl/platform/stringpiece.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace io {
TEST(PathTest, JoinPath) {
EXPECT_EQ("/foo/bar", JoinPath("/foo", "bar"));
EXPECT_EQ("foo/bar", JoinPath("foo", "bar"));
EXPECT_EQ("foo... |
2,604 | cpp | google/tsl | status | tsl/platform/status.cc | tsl/platform/status_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_STATUS_H_
#define TENSORFLOW_TSL_PLATFORM_DEFAULT_STATUS_H_
#define MAYBE_ADD_SOURCE_LOCATION(status) \
{}
#define ADD_SOURCE_LOCATION(status) status
#endif
#include "tsl/platform/status.h"
#include <stdio.h>
#include <deque>
#include <functional>
#include <memory>
#include <... | #include "tsl/platform/status.h"
#include <unordered_map>
#include <vector>
#include "absl/status/status.h"
#include "absl/strings/cord.h"
#include "absl/strings/str_format.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/stack_frame.h"
#include "tsl/platform/status_matchers.h"
#include "tsl/platform/status_t... |
2,605 | cpp | google/tsl | gcs_throttle | tsl/platform/cloud/gcs_throttle.cc | tsl/platform/cloud/gcs_throttle_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_THROTTLE_H_
#define TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_THROTTLE_H_
#include "tsl/platform/env.h"
namespace tsl {
struct GcsThrottleConfig {
bool enabled = false;
int64_t token_rate =
100000;
int64_t bucket_size = 10000000;
int64_t tokens_per_request = 100;
in... | #include "tsl/platform/cloud/gcs_throttle.h"
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/str_util.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace {
class TestTime : public EnvTime {
public:
uint64 GetOverridableNowNanos() const override {
return now_micros_ * kMicrosToNanos;
}... |
2,606 | cpp | google/tsl | curl_http_request | tsl/platform/cloud/curl_http_request.cc | tsl/platform/cloud/curl_http_request_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_CURL_HTTP_REQUEST_H_
#define TENSORFLOW_TSL_PLATFORM_CLOUD_CURL_HTTP_REQUEST_H_
#include <string>
#include <unordered_map>
#include <vector>
#include <curl/curl.h>
#include "tsl/platform/cloud/http_request.h"
#include "tsl/platform/env.h"
#include "tsl/platform/errors.h"
#include "... | #include "tsl/platform/cloud/curl_http_request.h"
#include <fstream>
#include <string>
#include "absl/status/status.h"
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/mem.h"
#include "tsl/platform/path.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace {
const string kTestContent = "random or... |
2,607 | cpp | google/tsl | ram_file_block_cache | tsl/platform/cloud/ram_file_block_cache.cc | tsl/platform/cloud/ram_file_block_cache_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_RAM_FILE_BLOCK_CACHE_H_
#define TENSORFLOW_TSL_PLATFORM_CLOUD_RAM_FILE_BLOCK_CACHE_H_
#include <functional>
#include <list>
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "tsl/platform/cloud/file_block_cache.h"
#include "tsl/platform/env.h"
#include "... | #include "tsl/platform/cloud/ram_file_block_cache.h"
#include <cstring>
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/blocking_counter.h"
#include "tsl/platform/cloud/now_seconds_env.h"
#include "tsl/platform/env.h"
#include "tsl/platform/notification.h"
#include "tsl/platform/test.h"
namespace tsl ... |
2,608 | cpp | google/tsl | time_util | tsl/platform/cloud/time_util.cc | tsl/platform/cloud/time_util_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_TIME_UTIL_H_
#define TENSORFLOW_TSL_PLATFORM_CLOUD_TIME_UTIL_H_
#include "tsl/platform/status.h"
namespace tsl {
Status ParseRfc3339Time(const string& time, int64_t* mtime_nsec);
}
#endif
#include "tsl/platform/cloud/time_util.h"
#include <time.h>
#include <cmath>
#include <cst... | #include "tsl/platform/cloud/time_util.h"
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/test.h"
namespace tsl {
TEST(TimeUtil, ParseRfc3339Time) {
int64_t mtime_nsec;
TF_EXPECT_OK(ParseRfc3339Time("2016-04-29T23:15:24.896Z", &mtime_nsec));
EXPECT_NEAR(1461971724896, mtime_nsec / 1000 / 1000, 1... |
2,609 | cpp | google/tsl | google_auth_provider | tsl/platform/cloud/google_auth_provider.cc | tsl/platform/cloud/google_auth_provider_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_GOOGLE_AUTH_PROVIDER_H_
#define TENSORFLOW_TSL_PLATFORM_CLOUD_GOOGLE_AUTH_PROVIDER_H_
#include <memory>
#include "tsl/platform/cloud/auth_provider.h"
#include "tsl/platform/cloud/compute_engine_metadata_client.h"
#include "tsl/platform/cloud/oauth_client.h"
#include "tsl/platform/m... | #include "tsl/platform/cloud/google_auth_provider.h"
#include <stdlib.h>
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/cloud/http_request_fake.h"
#include "tsl/platform/path.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace {
string TestData() {
return io::JoinPath(testing::TslSrcRoot(),... |
2,610 | cpp | google/tsl | gcs_file_system | tsl/platform/cloud/gcs_file_system.cc | tsl/platform/cloud/gcs_file_system_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_FILE_SYSTEM_H_
#define TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_FILE_SYSTEM_H_
#include <string>
#include <unordered_set>
#include <utility>
#include <vector>
#include "tsl/platform/cloud/auth_provider.h"
#include "tsl/platform/cloud/compute_engine_metadata_client.h"
#include "tsl/pla... | #include "tsl/platform/cloud/gcs_file_system.h"
#include <fstream>
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/cloud/http_request_fake.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/str_util.h"
#include "tsl/platform/strcat.h"
#include "tsl/platform/test.h"
#ifdef PLATFORM_WINDOWS
#und... |
2,611 | cpp | google/tsl | gcs_dns_cache | tsl/platform/cloud/gcs_dns_cache.cc | tsl/platform/cloud/gcs_dns_cache_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_DNS_CACHE_H_
#define TENSORFLOW_TSL_PLATFORM_CLOUD_GCS_DNS_CACHE_H_
#include <random>
#include "tsl/platform/cloud/http_request.h"
#include "tsl/platform/env.h"
namespace tsl {
const int64_t kDefaultRefreshRateSecs = 60;
class GcsDnsCache {
public:
GcsDnsCache() : GcsDnsCach... | #include "tsl/platform/cloud/gcs_dns_cache.h"
#include "tsl/platform/str_util.h"
#include "tsl/platform/test.h"
namespace tsl {
class TestHttpRequest : public HttpRequest {
public:
void SetUri(const string& uri) override {}
void SetRange(uint64 start, uint64 end) override {}
void AddHeader(const string& name, co... |
2,612 | cpp | google/tsl | compute_engine_metadata_client | tsl/platform/cloud/compute_engine_metadata_client.cc | tsl/platform/cloud/compute_engine_metadata_client_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_METADATA_CLIENT_H_
#define TENSORFLOW_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_METADATA_CLIENT_H_
#include "tsl/platform/cloud/http_request.h"
#include "tsl/platform/retrying_utils.h"
#include "tsl/platform/status.h"
namespace tsl {
class ComputeEngineMetadataClient {
publ... | #include "tsl/platform/cloud/compute_engine_metadata_client.h"
#include "tsl/platform/cloud/http_request_fake.h"
#include "tsl/platform/env.h"
#include "tsl/platform/test.h"
namespace tsl {
class ComputeEngineMetadataClientTest : public ::testing::Test {
protected:
void SetUp() override { ClearEnvVars(); }
void Te... |
2,613 | cpp | google/tsl | oauth_client | tsl/platform/cloud/oauth_client.cc | tsl/platform/cloud/oauth_client_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_OAUTH_CLIENT_H_
#define TENSORFLOW_TSL_PLATFORM_CLOUD_OAUTH_CLIENT_H_
#include <memory>
#include "json/json.h"
#include "tsl/platform/cloud/http_request.h"
#include "tsl/platform/env.h"
#include "tsl/platform/status.h"
namespace tsl {
class OAuthClient {
public:
OAuthClient();
... | #include "tsl/platform/cloud/oauth_client.h"
#include <fstream>
#include <openssl/bio.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/base64.h"
#include "tsl/platform/cloud/http_request_fake.h"
#include "tsl/platform/env.h"
#include "tsl/platform/pa... |
2,614 | cpp | google/tsl | compute_engine_zone_provider | tsl/platform/cloud/compute_engine_zone_provider.cc | tsl/platform/cloud/compute_engine_zone_provider_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_ZONE_PROVIDER_H_
#define TENSORFLOW_TSL_PLATFORM_CLOUD_COMPUTE_ENGINE_ZONE_PROVIDER_H_
#include "tsl/platform/cloud/compute_engine_metadata_client.h"
#include "tsl/platform/cloud/zone_provider.h"
namespace tsl {
class ComputeEngineZoneProvider : public ZoneProvider {... | #include "tsl/platform/cloud/compute_engine_zone_provider.h"
#include "tsl/platform/cloud/http_request_fake.h"
#include "tsl/platform/test.h"
namespace tsl {
class ComputeEngineZoneProviderTest : public ::testing::Test {
protected:
void SetUp() override {}
void TearDown() override {}
};
TEST_F(ComputeEngineZonePro... |
2,615 | cpp | google/tsl | cpu_utils | tsl/platform/profile_utils/cpu_utils.cc | tsl/platform/profile_utils/cpu_utils_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_PROFILE_UTILS_CPU_UTILS_H_
#define TENSORFLOW_TSL_PLATFORM_PROFILE_UTILS_CPU_UTILS_H_
#include <chrono>
#include <memory>
#include "tsl/platform/macros.h"
#include "tsl/platform/profile_utils/i_cpu_utils_helper.h"
#include "tsl/platform/types.h"
#if defined(ARMV6) || defined(__ARM_ARCH_7... | #include "tsl/platform/profile_utils/cpu_utils.h"
#include "tsl/platform/logging.h"
#include "tsl/platform/profile_utils/clock_cycle_profiler.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace profile_utils {
static constexpr bool DBG = false;
class CpuUtilsTest : public ::testing::Test {
protected:
void Se... |
2,616 | cpp | google/tsl | net | tsl/platform/windows/net.cc | tsl/platform/net_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_NET_H_
#define TENSORFLOW_TSL_PLATFORM_NET_H_
namespace tsl {
namespace internal {
int PickUnusedPortOrDie();
}
}
#endif
#include "tsl/platform/net.h"
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include <cerrno>
#include <cstdlib>
#in... | #include "tsl/platform/net.h"
#include "tsl/platform/logging.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace internal {
TEST(Net, PickUnusedPortOrDie) {
int port0 = PickUnusedPortOrDie();
int port1 = PickUnusedPortOrDie();
CHECK_GE(port0, 0);
CHECK_LT(port0, 65536);
CHECK_GE(port1, 0);
CHECK_LT(... |
2,617 | cpp | google/tsl | subprocess | tsl/platform/windows/subprocess.cc | tsl/platform/subprocess_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_SUBPROCESS_H_
#define TENSORFLOW_TSL_PLATFORM_DEFAULT_SUBPROCESS_H_
#include <errno.h>
#include <unistd.h>
#include <string>
#include <vector>
#include "tsl/platform/macros.h"
#include "tsl/platform/mutex.h"
#include "tsl/platform/types.h"
namespace tsl {
class SubProcess {
publ... | #include "tsl/platform/subprocess.h"
#include <stdlib.h>
#include <algorithm>
#include <string>
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/path.h"
#include "tsl/platform/strcat.h"
#include "tsl/platform/test.h"
#ifdef PLATFORM_WINDOWS
#define WIFEXITED(code) ((code) != 3)
#define WEXITSTATUS(code... |
2,618 | cpp | google/tsl | stacktrace_handler | tsl/platform/windows/stacktrace_handler.cc | tsl/platform/stacktrace_handler_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_STACKTRACE_HANDLER_H_
#define TENSORFLOW_TSL_PLATFORM_STACKTRACE_HANDLER_H_
namespace tsl {
namespace testing {
void InstallStacktraceHandler();
}
}
#endif
#include "tsl/platform/platform.h"
#if !defined(IS_MOBILE_PLATFORM) && defined(PLATFORM_POSIX) && \
(defined(__clang__) ||... | #include <csignal>
#include "tsl/platform/logging.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace {
TEST(StacktraceHandlerTest, GeneratesStacktrace) {
EXPECT_DEATH(raise(SIGABRT), "testing::internal::UnitTestImpl::RunAllTests");
}
}
} |
2,619 | cpp | google/tsl | stacktrace | tsl/platform/windows/stacktrace.cc | tsl/platform/stacktrace_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_STACKTRACE_H_
#define TENSORFLOW_TSL_PLATFORM_DEFAULT_STACKTRACE_H_
#include "tsl/platform/platform.h"
#if !defined(IS_MOBILE_PLATFORM) && (defined(__clang__) || defined(__GNUC__))
#define TF_HAS_STACKTRACE
#endif
#if defined(TF_HAS_STACKTRACE)
#include <dlfcn.h>
#include <execin... | #include "tsl/platform/stacktrace.h"
#include <string>
#include "tsl/platform/logging.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace {
#if defined(TF_HAS_STACKTRACE)
TEST(StacktraceTest, StacktraceWorks) {
std::string stacktrace = CurrentStackTrace();
LOG(INFO) << "CurrentStackTrace():\n" << stacktrace... |
2,620 | cpp | google/tsl | logging | tsl/platform/default/logging.cc | tsl/platform/logging_test.cc | #if defined(_WIN32)
#pragma warning(disable : 4716)
#endif
#ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_LOGGING_H_
#define TENSORFLOW_TSL_PLATFORM_DEFAULT_LOGGING_H_
#include <atomic>
#include <limits>
#include <memory>
#include <sstream>
#include <string>
#include <vector>
#include "absl/base/log_severity.h"
#include "ab... | #include "tsl/platform/logging.h"
#include <cerrno>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <memory>
#include <sstream>
#include <vector>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "tsl/pl... |
2,621 | cpp | google/tsl | unbounded_work_queue | tsl/platform/default/unbounded_work_queue.cc | tsl/platform/unbounded_work_queue_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_UNBOUNDED_WORK_QUEUE_H_
#define TENSORFLOW_TSL_PLATFORM_DEFAULT_UNBOUNDED_WORK_QUEUE_H_
#include <deque>
#include <memory>
#include <vector>
#include "tsl/platform/env.h"
#include "tsl/platform/mutex.h"
#include "tsl/platform/notification.h"
namespace tsl {
class UnboundedWorkQue... | #include "tsl/platform/unbounded_work_queue.h"
#include "absl/memory/memory.h"
#include "tsl/platform/random.h"
#include "tsl/platform/blocking_counter.h"
#include "tsl/platform/env.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace {
class UnboundedWorkQueueTest : public ::testing::Test {
protected:
Unboun... |
2,622 | cpp | google/tsl | mutex | tsl/platform/default/mutex.cc | tsl/platform/mutex_test.cc | #ifndef TENSORFLOW_TSL_PLATFORM_DEFAULT_MUTEX_H_
#define TENSORFLOW_TSL_PLATFORM_DEFAULT_MUTEX_H_
namespace tsl {
namespace internal {
std::cv_status wait_until_system_clock(
CVData *cv_data, MuData *mu_data,
const std::chrono::system_clock::time_point timeout_time);
}
template <class Rep, class Period>
std::... | #include "tsl/platform/mutex.h"
#include "tsl/platform/test.h"
#include "tsl/platform/threadpool.h"
namespace tsl {
namespace {
class MutexTest : public ::testing::Test {
protected:
mutex_lock GetLock() TF_NO_THREAD_SAFETY_ANALYSIS {
return mutex_lock{mu_};
}
tf_shared_lock GetSharedLock() TF_NO_THREAD_SAFET... |
2,623 | cpp | google/tsl | parse_annotation | tsl/profiler/utils/parse_annotation.cc | tsl/profiler/utils/parse_annotation_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_UTILS_PARSE_ANNOTATION_H_
#define TENSORFLOW_TSL_PROFILER_UTILS_PARSE_ANNOTATION_H_
#include <vector>
#include "absl/strings/string_view.h"
namespace tsl {
namespace profiler {
struct Annotation {
absl::string_view name;
struct Metadata {
absl::string_view key;
absl::string_v... | #include "tsl/profiler/utils/parse_annotation.h"
#include <vector>
#include "absl/strings/string_view.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace profiler {
namespace {
TEST(ParseAnnotationStackTest, EmptyAnnotationStackTest) {
std::vector<Annotation> annotations = ParseAnnotationStack("");
ASSERT_T... |
2,624 | cpp | google/tsl | xplane_utils | tsl/profiler/utils/xplane_utils.cc | tsl/profiler/utils/xplane_utils_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_UTILS_XPLANE_UTILS_H_
#define TENSORFLOW_TSL_PROFILER_UTILS_XPLANE_UTILS_H_
#include <algorithm>
#include <cstdint>
#include <optional>
#include <vector>
#include "absl/algorithm/container.h"
#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include "ab... | #include "tsl/profiler/utils/xplane_utils.h"
#include <cstdint>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "tsl/platform/test.h"
#include "tsl/platform/types.h"
#incl... |
2,625 | cpp | google/tsl | timestamp_utils | tsl/profiler/utils/timestamp_utils.cc | tsl/profiler/utils/timestamp_utils_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_UTILS_TIMESTAMP_UTILS_H_
#define TENSORFLOW_TSL_PROFILER_UTILS_TIMESTAMP_UTILS_H_
#include <cstdint>
#include "tsl/profiler/protobuf/xplane.pb.h"
namespace tsl {
namespace profiler {
void SetSessionTimestamps(uint64_t start_walltime_ns, uint64_t stop_walltime_ns,
... | #include "tsl/profiler/utils/timestamp_utils.h"
#include "tsl/platform/test.h"
#include "tsl/profiler/utils/xplane_schema.h"
#include "tsl/profiler/utils/xplane_utils.h"
#include "tsl/profiler/utils/xplane_visitor.h"
namespace tsl {
namespace profiler {
using ::testing::Eq;
TEST(TimestampUtilsTest, StartAndStopTimestam... |
2,626 | cpp | google/tsl | xplane_builder | tsl/profiler/utils/xplane_builder.cc | tsl/profiler/utils/xplane_builder_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_UTILS_XPLANE_BUILDER_H_
#define TENSORFLOW_TSL_PROFILER_UTILS_XPLANE_BUILDER_H_
#include <stddef.h>
#include <cstdint>
#include <string>
#include <utility>
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "absl/meta/type_traits.h"
#include "absl/strings/numbers.h"
#in... | #include "tsl/profiler/utils/xplane_builder.h"
#include <string>
#include "absl/strings/string_view.h"
#include "tsl/platform/test.h"
#include "tsl/profiler/protobuf/xplane.pb.h"
#include "tsl/profiler/utils/xplane_visitor.h"
namespace tsl {
namespace profiler {
namespace {
TEST(TimespanTests, NonInstantSpanIncludesSin... |
2,627 | cpp | google/tsl | preprocess_xplane | tsl/profiler/utils/preprocess_xplane.cc | tsl/profiler/utils/preprocess_xplane_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_UTILS_PREPROCESS_XPLANE_H_
#define TENSORFLOW_TSL_PROFILER_UTILS_PREPROCESS_XPLANE_H_
#include <cstdint>
#include <memory>
#include <optional>
#include <tuple>
#include <type_traits>
#include <utility>
#include <variant>
#include <vector>
#include "absl/hash/hash.h"
#include "absl/log/lo... | #include "tsl/profiler/utils/preprocess_xplane.h"
#include <cstdint>
#include <memory>
#include <optional>
#include "absl/container/flat_hash_map.h"
#include "absl/hash/hash.h"
#include "tsl/platform/test.h"
#include "tsl/profiler/lib/connected_traceme.h"
#include "tsl/profiler/protobuf/xplane.pb.h"
#include "tsl/profi... |
2,628 | cpp | google/tsl | tf_op_utils | tsl/profiler/utils/tf_op_utils.cc | tsl/profiler/utils/tf_op_utils_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_UTILS_TF_OP_UTILS_H_
#define TENSORFLOW_TSL_PROFILER_UTILS_TF_OP_UTILS_H_
#include <string>
#include <vector>
#include "absl/strings/match.h"
#include "absl/strings/string_view.h"
#include "tsl/platform/macros.h"
namespace tsl {
namespace profiler {
TF_CONST_INIT extern const absl::strin... | #include "tsl/profiler/utils/tf_op_utils.h"
#include <vector>
#include "absl/strings/string_view.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace profiler {
namespace {
TEST(TfOpUtilsTest, TfOpTest) {
const absl::string_view kName = "OpName:OpType";
TfOp tf_op = ParseTfOpFullname(kName);
EXPECT_EQ(tf_o... |
2,629 | cpp | google/tsl | buffer_pool | tsl/profiler/utils/buffer_pool.cc | tsl/profiler/utils/buffer_pool_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_UTILS_BUFFER_POOL_H_
#define TENSORFLOW_TSL_PROFILER_UTILS_BUFFER_POOL_H_
#include <vector>
#include "tsl/platform/mutex.h"
#include "tsl/platform/thread_annotations.h"
namespace tsl {
namespace profiler {
class BufferPool {
public:
explicit BufferPool(size_t buffer_size_in_bytes);
... | #include "tsl/profiler/utils/buffer_pool.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace profiler {
namespace {
TEST(BufferPoolTest, GetOrCreateBufferAlloc) {
constexpr size_t kBufferSizeInBytes = 32 * 1024;
BufferPool buffer_pool(kBufferSizeInBytes);
uint8_t* first_buffer = buffer_pool.GetOrCreateBuf... |
2,630 | cpp | google/tsl | group_events | tsl/profiler/utils/group_events.cc | tsl/profiler/utils/group_events_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_UTILS_GROUP_EVENTS_H_
#define TENSORFLOW_TSL_PROFILER_UTILS_GROUP_EVENTS_H_
#include <deque>
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set... | #include "tsl/profiler/utils/group_events.h"
#include <optional>
#include "absl/container/flat_hash_map.h"
#include "absl/strings/string_view.h"
#include "tsl/platform/test.h"
#include "tsl/platform/types.h"
#include "tsl/profiler/protobuf/xplane.pb.h"
#include "tsl/profiler/utils/tf_xplane_visitor.h"
#include "tsl/pro... |
2,631 | cpp | google/tsl | tpu_xplane_utils | tsl/profiler/utils/tpu_xplane_utils.cc | tsl/profiler/utils/tpu_xplane_utils_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_UTILS_TPU_XPLANE_UTILS_H_
#define TENSORFLOW_TSL_PROFILER_UTILS_TPU_XPLANE_UTILS_H_
#include <optional>
#include <vector>
#include "absl/strings/string_view.h"
#include "tsl/profiler/protobuf/xplane.pb.h"
namespace tsl {
namespace profiler {
std::vector<const tensorflow::profiler::XPlane... | #include "tsl/profiler/utils/tpu_xplane_utils.h"
#include <vector>
#include "absl/strings/str_cat.h"
#include "tsl/platform/test.h"
#include "tsl/profiler/protobuf/xplane.pb.h"
#include "tsl/profiler/utils/xplane_schema.h"
#include "tsl/profiler/utils/xplane_utils.h"
namespace tsl {
namespace profiler {
namespace {
usi... |
2,632 | cpp | google/tsl | xplane_to_trace_events | tsl/profiler/convert/xplane_to_trace_events.cc | tsl/profiler/convert/xplane_to_trace_events_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_CONVERT_XPLANE_TO_TRACE_EVENTS_H_
#define TENSORFLOW_TSL_PROFILER_CONVERT_XPLANE_TO_TRACE_EVENTS_H_
#include <string>
#include "tsl/platform/types.h"
#include "tsl/profiler/convert/trace_container.h"
#include "tsl/profiler/protobuf/xplane.pb.h"
namespace tsl {
namespace profiler {
TraceC... | #include "tsl/profiler/convert/xplane_to_trace_events.h"
#include <limits>
#include <utility>
#include "tsl/platform/test.h"
#include "tsl/profiler/protobuf/trace_events.pb.h"
#include "tsl/profiler/protobuf/xplane.pb.h"
#include "tsl/profiler/utils/trace_utils.h"
#include "tsl/profiler/utils/xplane_builder.h"
#include... |
2,633 | cpp | google/tsl | trace_container | tsl/profiler/convert/trace_container.cc | tsl/profiler/convert/trace_container_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_CONVERT_TRACE_CONTAINER_H_
#define TENSORFLOW_TSL_PROFILER_CONVERT_TRACE_CONTAINER_H_
#include <string>
#include <string_view>
#include <vector>
#include "tsl/profiler/protobuf/trace_events.pb.h"
namespace tsl {
namespace profiler {
using tsl::profiler::Device;
using tsl::profiler::Trace... | #include "tsl/profiler/convert/trace_container.h"
#include <string>
#include "tsl/platform/protobuf.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace profiler {
namespace {
void PopulateDummyEvent(TraceEvent* const event) {
event->set_device_id(1);
event->set_resource_id(2);
event->set_name("A");
even... |
2,634 | cpp | google/tsl | trace_events_to_json | tsl/profiler/convert/trace_events_to_json.cc | tsl/profiler/convert/trace_events_to_json_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_CONVERT_TRACE_EVENTS_TO_JSON_H_
#define TENSORFLOW_TSL_PROFILER_CONVERT_TRACE_EVENTS_TO_JSON_H_
#include <string>
#include "tsl/platform/types.h"
#include "tsl/profiler/convert/trace_container.h"
namespace tsl {
namespace profiler {
std::string TraceContainerToJson(const TraceContainer& ... | #include "tsl/profiler/convert/trace_events_to_json.h"
#include <string>
#include "json/json.h"
#include "tsl/platform/protobuf.h"
#include "tsl/platform/test.h"
#include "tsl/profiler/convert/trace_container.h"
#include "tsl/profiler/protobuf/trace_events.pb.h"
namespace tsl {
namespace profiler {
namespace {
Json::Va... |
2,635 | cpp | google/tsl | remote_profiler_session_manager | tsl/profiler/rpc/client/remote_profiler_session_manager.cc | tsl/profiler/rpc/client/remote_profiler_session_manager_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_RPC_CLIENT_REMOTE_PROFILER_SESSION_MANAGER_H_
#define TENSORFLOW_TSL_PROFILER_RPC_CLIENT_REMOTE_PROFILER_SESSION_MANAGER_H_
#include <functional>
#include <memory>
#include <vector>
#include "absl/strings/string_view.h"
#include "tsl/platform/macros.h"
#include "tsl/platform/mutex.h"
#in... | #include "tsl/profiler/rpc/client/remote_profiler_session_manager.h"
#include <memory>
#include <string>
#include <vector>
#include "absl/status/status.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/status.h"
#include "tsl/platform/test.h"
#include "t... |
2,636 | cpp | google/tsl | profiler_client | tsl/profiler/rpc/client/profiler_client.cc | tsl/profiler/rpc/client/profiler_client_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_RPC_CLIENT_PROFILER_CLIENT_H_
#define TENSORFLOW_TSL_PROFILER_RPC_CLIENT_PROFILER_CLIENT_H_
#include <memory>
#include <string>
#include "absl/strings/string_view.h"
#include "absl/time/time.h"
#include "tsl/platform/status.h"
#include "tsl/profiler/protobuf/profiler_analysis.grpc.pb.h"
... | #include "tsl/profiler/rpc/client/profiler_client.h"
#include <memory>
#include <string>
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/status.h"
#include "tsl/platform/test.h"
#include "tsl/platform/types.h"
#include "tsl/profiler/protobuf/profiler_serv... |
2,637 | cpp | google/tsl | traceme_recorder | tsl/profiler/backends/cpu/traceme_recorder.cc | tsl/profiler/backends/cpu/traceme_recorder_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_BACKENDS_CPU_TRACEME_RECORDER_H_
#define TENSORFLOW_TSL_PROFILER_BACKENDS_CPU_TRACEME_RECORDER_H_
#include <atomic>
#include <cstdint>
#include <deque>
#include <string>
#include <vector>
#include "tsl/platform/macros.h"
#include "tsl/platform/types.h"
namespace tsl {
namespace profiler ... | #include "tsl/profiler/backends/cpu/traceme_recorder.h"
#include <atomic>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_cat.h"
#include "tsl/platform/env.h"
#include "tsl/platform/logging.h"
#i... |
2,638 | cpp | google/tsl | profiler_lock | tsl/profiler/lib/profiler_lock.cc | tsl/profiler/lib/profiler_lock_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_LIB_PROFILER_LOCK_H_
#define TENSORFLOW_TSL_PROFILER_LIB_PROFILER_LOCK_H_
#include <utility>
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include "tsl/platform/statusor.h"
namespace tsl {
namespace profiler {
constexpr absl::string_view kProfilerLockContention... | #include "tsl/profiler/lib/profiler_lock.h"
#include <utility>
#include "absl/status/statusor.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace profiler {
namespace {
TEST(ProfilerLockTest, DefaultConstructorCreatesInactiveInstance) {
ProfilerLock profiler_lock;
EXPECT_FALSE(profiler_lock.Active());
}
TES... |
2,639 | cpp | google/tsl | profiler_factory | tsl/profiler/lib/profiler_factory.cc | tsl/profiler/lib/profiler_factory_test.cc | #ifndef TENSORFLOW_TSL_PROFILER_LIB_PROFILER_FACTORY_H_
#define TENSORFLOW_TSL_PROFILER_LIB_PROFILER_FACTORY_H_
#include <functional>
#include <memory>
#include <vector>
#include "tsl/profiler/lib/profiler_interface.h"
#include "tsl/profiler/protobuf/profiler_options.pb.h"
namespace tsl {
namespace profiler {
using Pro... | #include "tsl/profiler/lib/profiler_factory.h"
#include <functional>
#include <utility>
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "tsl/platform/macros.h"
#include "tsl/platform/test.h"
#include "tsl/profiler/lib/profiler_interface.h"
#include "tsl/profiler/protobuf/profiler_options.pb.h"
... |
2,640 | cpp | google/tsl | weighted_picker | tsl/lib/random/weighted_picker.cc | tsl/lib/random/weighted_picker_test.cc | #ifndef TENSORFLOW_TSL_LIB_RANDOM_WEIGHTED_PICKER_H_
#define TENSORFLOW_TSL_LIB_RANDOM_WEIGHTED_PICKER_H_
#include <assert.h>
#include "tsl/platform/logging.h"
#include "tsl/platform/macros.h"
#include "tsl/platform/types.h"
namespace tsl {
namespace random {
class SimplePhilox;
class WeightedPicker {
public:
explic... | #include "tsl/lib/random/weighted_picker.h"
#include <string.h>
#include <vector>
#include "tsl/lib/random/simple_philox.h"
#include "tsl/platform/logging.h"
#include "tsl/platform/macros.h"
#include "tsl/platform/test.h"
#include "tsl/platform/test_benchmark.h"
#include "tsl/platform/types.h"
namespace tsl {
namespace... |
2,641 | cpp | google/tsl | random_distributions | tsl/lib/random/random_distributions.cc | tsl/lib/random/random_distributions_test.cc | #ifndef TENSORFLOW_TSL_LIB_RANDOM_RANDOM_DISTRIBUTIONS_H_
#define TENSORFLOW_TSL_LIB_RANDOM_RANDOM_DISTRIBUTIONS_H_
#include <algorithm>
#include <cmath>
#include <type_traits>
#include "unsupported/Eigen/CXX11/Tensor"
#include "tsl/lib/random/philox_random.h"
#include "tsl/lib/random/random_distributions_utils.h"
#i... | #include "tsl/lib/random/random_distributions.h"
#include <algorithm>
#include <cmath>
#include <functional>
#include <numeric>
#include <unordered_map>
#include <vector>
#include "tsl/lib/math/math_util.h"
#include "tsl/lib/random/philox_random.h"
#include "tsl/lib/random/philox_random_test_utils.h"
#include "tsl/plat... |
2,642 | cpp | google/tsl | distribution_sampler | tsl/lib/random/distribution_sampler.cc | tsl/lib/random/distribution_sampler_test.cc | #ifndef TENSORFLOW_TSL_LIB_RANDOM_DISTRIBUTION_SAMPLER_H_
#define TENSORFLOW_TSL_LIB_RANDOM_DISTRIBUTION_SAMPLER_H_
#include <memory>
#include <utility>
#include "absl/types/span.h"
#include "tsl/lib/random/simple_philox.h"
#include "tsl/platform/logging.h"
#include "tsl/platform/macros.h"
#include "tsl/platform/types.... | #include "tsl/lib/random/distribution_sampler.h"
#include <string.h>
#include <memory>
#include <vector>
#include "tsl/lib/random/simple_philox.h"
#include "tsl/platform/macros.h"
#include "tsl/platform/test.h"
#include "tsl/platform/test_benchmark.h"
#include "tsl/platform/types.h"
namespace tsl {
namespace random {
c... |
2,643 | cpp | google/tsl | simple_philox | tsl/lib/random/simple_philox.cc | tsl/lib/random/simple_philox_test.cc | #ifndef TENSORFLOW_TSL_LIB_RANDOM_SIMPLE_PHILOX_H_
#define TENSORFLOW_TSL_LIB_RANDOM_SIMPLE_PHILOX_H_
#include <math.h>
#include <string.h>
#include <algorithm>
#include "tsl/lib/random/philox_random.h"
#include "tsl/lib/random/random_distributions.h"
namespace tsl {
namespace random {
class SimplePhilox {
public:
P... | #include "tsl/lib/random/simple_philox.h"
#include <set>
#include <string>
#include "tsl/platform/logging.h"
#include "tsl/platform/test.h"
#include "tsl/platform/types.h"
namespace tsl {
namespace random {
namespace {
TEST(SimplePhiloxTest, FloatTest) {
PhiloxRandom philox(7, 7);
SimplePhilox gen(&philox);
stati... |
2,644 | cpp | google/tsl | histogram | null | null | #ifndef TENSORFLOW_TSL_LIB_HISTOGRAM_HISTOGRAM_H_
#define TENSORFLOW_TSL_LIB_HISTOGRAM_HISTOGRAM_H_
#include <string>
#include <vector>
#include "tsl/platform/macros.h"
#include "tsl/platform/mutex.h"
#include "tsl/platform/thread_annotations.h"
#include "tsl/platform/types.h"
namespace tensorflow {
class HistogramProt... | #include "tsl/lib/histogram/histogram.h"
#include <float.h>
#include "tsl/platform/logging.h"
#include "tsl/platform/test.h"
#include "tsl/protobuf/histogram.pb.h"
namespace tsl {
namespace histogram {
static void Validate(const Histogram& h) {
string s1 = h.ToString();
LOG(ERROR) << s1;
HistogramProto proto_with... |
2,645 | cpp | google/tsl | crc32c | tsl/lib/hash/crc32c.cc | tsl/lib/hash/crc32c_test.cc | #ifndef TENSORFLOW_TSL_LIB_HASH_CRC32C_H_
#define TENSORFLOW_TSL_LIB_HASH_CRC32C_H_
#include <stddef.h>
#include "absl/crc/crc32c.h"
#include "absl/strings/string_view.h"
#include "tsl/platform/cord.h"
#include "tsl/platform/platform.h"
#include "tsl/platform/types.h"
namespace tsl {
namespace crc32c {
inline uint32 Ex... | #include "tsl/lib/hash/crc32c.h"
#include <string>
#include "absl/strings/cord.h"
#include "tsl/platform/logging.h"
#include "tsl/platform/test.h"
#include "tsl/platform/test_benchmark.h"
#include "tsl/platform/types.h"
namespace tsl {
namespace crc32c {
TEST(CRC, StandardResults) {
char buf[32];
memset(buf, 0, siz... |
2,646 | cpp | google/tsl | bitmap | null | null | #ifndef TENSORFLOW_TSL_LIB_CORE_BITMAP_H_
#define TENSORFLOW_TSL_LIB_CORE_BITMAP_H_
#include <string>
#include "tsl/platform/logging.h"
namespace tsl {
namespace core {
class Bitmap {
public:
Bitmap();
explicit Bitmap(size_t n);
~Bitmap();
Bitmap(const Bitmap&) = delete;
Bitmap& operator=(const Bitmap&) = de... | #include "tsl/lib/core/bitmap.h"
#include "tsl/lib/random/simple_philox.h"
#include "tsl/platform/macros.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace core {
namespace {
size_t NextSize(size_t n) { return n + ((n < 75) ? 1 : 25); }
static void MakeRandomBitmap(random::SimplePhilox* rnd, Bitmap* bitmap) {
... |
2,647 | cpp | google/tsl | table | tsl/lib/io/table.cc | tsl/lib/io/table_test.cc | #ifndef TENSORFLOW_TSL_LIB_IO_TABLE_H_
#define TENSORFLOW_TSL_LIB_IO_TABLE_H_
#include <stdint.h>
#include "tsl/lib/io/iterator.h"
namespace tsl {
class RandomAccessFile;
namespace table {
struct Options;
class Table {
public:
static absl::Status Open(const Options& options, tsl::RandomAccessFile* file,
... | #include "tsl/lib/io/table.h"
#include <algorithm>
#include <map>
#include <string>
#include <vector>
#include "absl/strings/escaping.h"
#include "tsl/lib/io/block.h"
#include "tsl/lib/io/block_builder.h"
#include "tsl/lib/io/format.h"
#include "tsl/lib/io/iterator.h"
#include "tsl/lib/io/table_builder.h"
#include "tsl... |
2,648 | cpp | google/tsl | random_inputstream | tsl/lib/io/random_inputstream.cc | tsl/lib/io/random_inputstream_test.cc | #ifndef TENSORFLOW_TSL_LIB_IO_RANDOM_INPUTSTREAM_H_
#define TENSORFLOW_TSL_LIB_IO_RANDOM_INPUTSTREAM_H_
#include "tsl/lib/io/inputstream_interface.h"
#include "tsl/platform/cord.h"
#include "tsl/platform/file_system.h"
namespace tsl {
namespace io {
class RandomAccessInputStream : public InputStreamInterface {
public:... | #include "tsl/lib/io/random_inputstream.h"
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/env.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace io {
namespace {
TEST(RandomInputStream, ReadNBytes) {
Env* env = Env::Default();
string fname = testing::TmpDir() + "/random_inputbuffer_test"... |
2,649 | cpp | google/tsl | buffered_inputstream | tsl/lib/io/buffered_inputstream.cc | tsl/lib/io/buffered_inputstream_test.cc | #ifndef TENSORFLOW_TSL_LIB_IO_BUFFERED_INPUTSTREAM_H_
#define TENSORFLOW_TSL_LIB_IO_BUFFERED_INPUTSTREAM_H_
#include <string>
#include "tsl/lib/io/inputstream_interface.h"
#include "tsl/platform/file_system.h"
namespace tsl {
namespace io {
class BufferedInputStream : public InputStreamInterface {
public:
BufferedIn... | #include "tsl/lib/io/buffered_inputstream.h"
#include "tsl/lib/core/status_test_util.h"
#include "tsl/lib/io/random_inputstream.h"
#include "tsl/platform/env.h"
#include "tsl/platform/test.h"
#include "tsl/platform/test_benchmark.h"
namespace tsl {
namespace io {
namespace {
static std::vector<int> BufferSizes() {
re... |
2,650 | cpp | google/tsl | inputbuffer | tsl/lib/io/inputbuffer.cc | tsl/lib/io/inputbuffer_test.cc | #ifndef TENSORFLOW_TSL_LIB_IO_INPUTBUFFER_H_
#define TENSORFLOW_TSL_LIB_IO_INPUTBUFFER_H_
#include <string>
#include "tsl/platform/coding.h"
#include "tsl/platform/env.h"
#include "tsl/platform/macros.h"
#include "tsl/platform/status.h"
#include "tsl/platform/types.h"
namespace tsl {
namespace io {
class InputBuffer {
... | #include "tsl/lib/io/inputbuffer.h"
#include <vector>
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/coding.h"
#include "tsl/platform/env.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/logging.h"
#include "tsl/platform/status.h"
#include "tsl/platform/str_util.h"
#include "tsl/platform/st... |
2,651 | cpp | google/tsl | cache | tsl/lib/io/cache.cc | tsl/lib/io/cache_test.cc | #ifndef TENSORFLOW_TSL_LIB_IO_CACHE_H_
#define TENSORFLOW_TSL_LIB_IO_CACHE_H_
#include <cstdint>
#include "tsl/platform/stringpiece.h"
namespace tsl {
using Slice = StringPiece;
namespace table {
class Cache;
Cache* NewLRUCache(size_t capacity);
class Cache {
public:
Cache() = default;
Cache(const Cache&) = delete... | #include "tsl/lib/io/cache.h"
#include <string>
#include <vector>
#include "tsl/platform/coding.h"
#include "tsl/platform/raw_coding.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace table {
static std::string EncodeKey(int k) {
std::string result;
core::PutFixed32(&result, k);
return result;
}
static i... |
2,652 | cpp | google/tsl | inputstream_interface | tsl/lib/io/inputstream_interface.cc | tsl/lib/io/inputstream_interface_test.cc | #ifndef TENSORFLOW_TSL_LIB_IO_INPUTSTREAM_INTERFACE_H_
#define TENSORFLOW_TSL_LIB_IO_INPUTSTREAM_INTERFACE_H_
#include <string>
#include "tsl/platform/cord.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/status.h"
#include "tsl/platform/types.h"
namespace tsl {
namespace io {
class InputStreamInterface {
pu... | #include "tsl/lib/io/inputstream_interface.h"
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/test.h"
namespace tsl {
namespace io {
namespace {
class TestStringStream : public InputStreamInterface {
public:
explicit TestStringStream(const string& content) : content... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.