format code with clang-format3.8

avx_docs
liaogang 8 years ago
parent 880aa220be
commit 976063c277

@ -12,13 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "hl_cuda.h"
#include <cuda_profiler_api.h> #include <cuda_profiler_api.h>
#include <string.h> #include <string.h>
#include <sys/syscall.h> #include <sys/syscall.h>
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>
#include <mutex> #include <mutex>
#include "hl_cuda.h"
#include "hl_cuda.ph" #include "hl_cuda.ph"
#include "hl_dso_loader.h" #include "hl_dso_loader.h"
#include "hl_thread.ph" #include "hl_thread.ph"

@ -19,7 +19,7 @@ using namespace paddle; // NOLINT
TEST(SIMDFlags, gccTest) { TEST(SIMDFlags, gccTest) {
#if (defined(__GNUC__) || defined(__GNUG__)) && !(defined(__clang__)) #if (defined(__GNUC__) || defined(__GNUG__)) && !(defined(__clang__))
// clang-format off // clang-format off
CHECK(!__builtin_cpu_supports("sse") != HAS_SSE); CHECK(!__builtin_cpu_supports("sse") != HAS_SSE);
CHECK(!__builtin_cpu_supports("sse2") != HAS_SSE2); CHECK(!__builtin_cpu_supports("sse2") != HAS_SSE2);
CHECK(!__builtin_cpu_supports("sse3") != HAS_SSE3); CHECK(!__builtin_cpu_supports("sse3") != HAS_SSE3);
@ -33,16 +33,16 @@ TEST(SIMDFlags, gccTest) {
} }
TEST(SIMDFlags, normalPrint) { TEST(SIMDFlags, normalPrint) {
LOG(INFO) << "Has SSE: " << std::boolalpha << HAS_SSE; LOG(INFO) << "Has SSE: " << std::boolalpha << HAS_SSE;
LOG(INFO) << "Has SSE2: " << std::boolalpha << HAS_SSE2; LOG(INFO) << "Has SSE2: " << std::boolalpha << HAS_SSE2;
LOG(INFO) << "Has SSE3: " << std::boolalpha << HAS_SSE3; LOG(INFO) << "Has SSE3: " << std::boolalpha << HAS_SSE3;
LOG(INFO) << "Has SSSE3: " << std::boolalpha << HAS_SSSE3; LOG(INFO) << "Has SSSE3: " << std::boolalpha << HAS_SSSE3;
LOG(INFO) << "Has SSE4: " << std::boolalpha << HAS_SSE41 || HAS_SSE42; LOG(INFO) << "Has SSE4: " << std::boolalpha << HAS_SSE41 || HAS_SSE42;
LOG(INFO) << "Has FMA3: " << std::boolalpha << HAS_FMA3; LOG(INFO) << "Has FMA3: " << std::boolalpha << HAS_FMA3;
LOG(INFO) << "Has FMA4: " << std::boolalpha << HAS_FMA4; LOG(INFO) << "Has FMA4: " << std::boolalpha << HAS_FMA4;
LOG(INFO) << "Has AVX: " << std::boolalpha << HAS_AVX; LOG(INFO) << "Has AVX: " << std::boolalpha << HAS_AVX;
LOG(INFO) << "Has AVX2: " << std::boolalpha << HAS_AVX2; LOG(INFO) << "Has AVX2: " << std::boolalpha << HAS_AVX2;
LOG(INFO) << "Has AVX512: " << std::boolalpha << HAS_AVX512; LOG(INFO) << "Has AVX512: " << std::boolalpha << HAS_AVX512;
} }
int main(int argc, char** argv) { int main(int argc, char** argv) {

Loading…
Cancel
Save